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_get_downgrade.txt
env GO111MODULE=on
[short] skip

# downgrade sampler should downgrade quote
cp go.mod.orig go.mod
go get rsc.io/[email protected]
go list -m all
stdout 'rsc.io/quote v1.4.0'
stdout 'rsc.io/sampler v1.0.0'

# downgrade sampler away should downgrade quote further
go get rsc.io/sampler@none
go list -m all
stdout 'rsc.io/quote v1.3.0'

# downgrade should report inconsistencies and not change go.mod
go get rsc.io/[email protected]
go list -m all
stdout 'rsc.io/quote v1.5.1'
stdout 'rsc.io/sampler v1.3.0'

! go get rsc.io/[email protected] rsc.io/[email protected] golang.org/x/text@none
! stderr add|remove|upgrad|downgrad
stderr '^go: rsc.io/[email protected] requires rsc.io/[email protected], not rsc.io/[email protected]$'

go list -m all
stdout 'rsc.io/quote v1.5.1'
stdout 'rsc.io/sampler v1.3.0'

# go get -u args should limit upgrades
cp go.mod.empty go.mod
go get -u rsc.io/[email protected] rsc.io/[email protected]
go list -m all
stdout 'rsc.io/quote v1.4.0'
stdout 'rsc.io/sampler v1.0.0'
! stdout golang.org/x/text

# downgrading away quote should also downgrade away latemigrate/v2,
# since there are no older versions. v2.0.0 is incompatible.
cp go.mod.orig go.mod
go list -m -versions example.com/latemigrate/v2
stdout v2.0.0 # proxy may serve incompatible versions
go get rsc.io/quote@none
go list -m all
! stdout 'example.com/latemigrate/v2'

-- go.mod.orig --
module x
require (
	rsc.io/quote v1.5.1
	example.com/latemigrate/v2 v2.0.1
)
-- go.mod.empty --
module x
-- x.go --
package x