The Gopher resolver confines selectors with path cleaning and string-prefix checks, but it calls os.Stat/os.ReadFile on the unresolved path. If a member public area contains a symlink pointing outside that area, the resolver can follow it and serve content outside public_html / public files.
I reproduced this with a symlink inside users/alice/public_html pointing at a sibling secret.txt. The selector /~alice/leak.txt should be refused.
The Gopher resolver confines selectors with path cleaning and string-prefix checks, but it calls
os.Stat/os.ReadFileon the unresolved path. If a member public area contains a symlink pointing outside that area, the resolver can follow it and serve content outsidepublic_html/ public files.I reproduced this with a symlink inside
users/alice/public_htmlpointing at a siblingsecret.txt. The selector/~alice/leak.txtshould be refused.