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/goline_order.txt
# Check that go lines are always >= go lines of dependencies.

# Using too old a release cannot even complete module load.
env TESTGO_VERSION=go1.21.1
env TESTGO_VERSION_SWITCH=switch
cp go.mod go.mod.orig

# If the offending module is not imported, it's not detected.
go list
cmp go.mod go.mod.orig

# Adding the import produces the error.
# Maybe this should auto-switch, but it requires more plumbing to get this error through,
# and it's a misconfigured system that should not arise in practice, so not switching is fine.
! go list -deps -tags usem1
cmp go.mod go.mod.orig
stderr '^go: module ./m1 requires go >= 1.21.2 \(running go 1.21.1\)$'

# go get [email protected] fixes the error.
cp go.mod.orig go.mod
go get [email protected]
go list -deps -tags usem1

# go get -tags usem1 fixes the error.
cp go.mod.orig go.mod
go get -tags usem1
go list -deps -tags usem1

# go get fixes the error.
cp go.mod.orig go.mod
go get
go list -deps -tags usem1

# Using a new enough release reports the error after module load and suggests 'go mod tidy'
env TESTGO_VERSION=go1.21.2
cp go.mod.orig go.mod
! go list -deps -tags usem1
stderr 'updates to go.mod needed'
stderr 'go mod tidy'
go mod tidy
go list -deps -tags usem1

# go get also works
cp go.mod.orig go.mod
! go list -deps -tags usem1
stderr 'updates to go.mod needed'
stderr 'go mod tidy'
go get [email protected]
go list -deps -tags usem1


-- go.mod --
module m
go 1.21.1

require m1 v0.0.1

replace m1 => ./m1

-- m1/go.mod --
go 1.21.2

-- p.go --
//go:build usem1

package p

import _ "m1"

-- p1.go --
package p

-- m1/p.go --
package p