Fix regexp to handle dots in path elements (brown paper bag bug)

This commit is contained in:
Uriel 2008-06-28 04:15:15 +02:00
parent bc0727cef8
commit fb51a9dfe8

View file

@ -1,7 +1,7 @@
#!/usr/local/plan9/bin/rc #!/usr/local/plan9/bin/rc
path=(. ./bin $PLAN9/bin /bin/ /usr/bin) path=(. ./bin $PLAN9/bin /bin/ /usr/bin)
uri = `{echo -n $REQUEST_URI | sed -e 's/\?.*//; s/[^a-zA-Z0-9_+\-\/\.]//g; s/\.*/./g;' -e '1q'} uri = `{echo -n $REQUEST_URI | sed -e 's/\?.*//; s/[^a-zA-Z0-9_+\-\/\.]//g; s/\.\.*/./g;' -e '1q'}
ifs='/' { ifs='/' {
args = `{echo -n $uri} args = `{echo -n $uri}
} }