ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/golang/1.22.0/src/cmd/go/testdata/script/mod_replace_readonly.txt
# Check that with -mod=readonly, when we load a package in a module that is
# replaced but not required, we emit an error with the command to add the
# requirement.
# Verifies golang.org/issue/41416, golang.org/issue/41577.
cp go.mod go.mod.orig

# Replace all versions of a module without requiring it.
# With -mod=mod, we'd add a requirement for a "zero" pseudo-version, but we
# can't in readonly mode, since its go.mod may alter the build list.
go mod edit -replace rsc.io/quote=./quote
! go list rsc.io/quote
stderr '^module rsc.io/quote provides package rsc.io/quote and is replaced but not required; to add it:\n\tgo get rsc.io/quote$'
go get rsc.io/quote
cmp go.mod go.mod.latest
go list rsc.io/quote
cp go.mod.orig go.mod

# Same test with a specific version.
go mod edit -replace rsc.io/[email protected]=./quote
! go list rsc.io/quote
stderr '^module rsc.io/quote provides package rsc.io/quote and is replaced but not required; to add it:\n\tgo get rsc.io/[email protected]$'
go get rsc.io/[email protected]
cmp go.mod go.mod.specific
go list rsc.io/quote
cp go.mod.orig go.mod

# If there are multiple versions, the highest is suggested.
go mod edit -replace rsc.io/[email protected]=./quote
go mod edit -replace rsc.io/[email protected]=./quote
! go list rsc.io/quote
stderr '^module rsc.io/quote provides package rsc.io/quote and is replaced but not required; to add it:\n\tgo get rsc.io/[email protected]$'

-- go.mod --
module m

go 1.16
-- go.mod.latest --
module m

go 1.16

replace rsc.io/quote => ./quote

require rsc.io/quote v1.5.2 // indirect
-- go.mod.specific --
module m

go 1.16

replace rsc.io/quote v1.0.0-doesnotexist => ./quote

require rsc.io/quote v1.0.0-doesnotexist // indirect
-- use.go --
package use

import _ "rsc.io/quote"
-- quote/go.mod --
module rsc.io/quote

go 1.16
-- quote/quote.go --
package quote