ref: 49b784f6882e87f5f4d56b574cbd8b4047859fab
parent: 25085d9893f47f9e848033c3b168103d1c6f15df
author: uriel <uriel@suckless.org>
date: Sat Jun 28 00:15:15 EDT 2008
Fix regexp to handle dots in path elements (brown paper bag bug)
--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -1,7 +1,7 @@
#!/usr/local/plan9/bin/rc
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='/' {
args = `{echo -n $uri}
}