]> Cypherpunks repositories - gostls13.git/commit
add path.Clean and other utilities.
authorRuss Cox <rsc@golang.org>
Tue, 7 Apr 2009 07:40:07 +0000 (00:40 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 7 Apr 2009 07:40:07 +0000 (00:40 -0700)
commit16b38b554fb4dae82923cb81a5c6a76ee2959d2f
treed99b97d1215df17d8a4f968eb03664bc6512dee7
parent640f3f25dcd238bfc6b4fd99b1808071cfa12888
add path.Clean and other utilities.

use path.Clean in web server to sanitize URLs.

http://triv/go/../../../etc/passwd

no longer serves the password file.
it redirects to

http://triv/etc/passwd

which then gets a 404.

R=r
DELTA=288  (286 added, 0 deleted, 2 changed)
OCL=27142
CL=27152
src/lib/Makefile
src/lib/http/server.go
src/lib/path.go [new file with mode: 0644]
src/lib/path_test.go [new file with mode: 0644]