Allow : and , in urls, but strip them and redirect them if they are last char. This fixes some autogenerated links in other sites that will include . and , if they follow an url in an email for example.

This commit is contained in:
Uriel 2009-02-23 05:25:08 +00:00
parent 6f20bf679b
commit c31e6f176a

View file

@ -6,7 +6,7 @@
. ./fltr_cache.rc
cd ..
forbidden_uri_chars='[^a-zA-Z0-9_+\-\/\.]'
forbidden_uri_chars='[^a-zA-Z0-9_+\-\/\.,:]'
# Expected input: ls -F style, $sitedir/path/to/files/
# <ls -F+x><symlink hack><Useless?><hiden files >
@ -58,8 +58,10 @@ fn werc_exec_request {
if not # XXX: This redir might step on apps with synthetic dirs.
perm_redirect `{echo $req_path|sed 's,/+$,,'}
}
if not if(~ $req_path *'.' *',' *';' *':')
perm_redirect `{echo $req_path | sed 's/[.,;:)]$//'}
if not if(test -d $local_path)
perm_redirect $base_url^$req_path^'/'
perm_redirect $req_path^'/'
if(! ~ $#args 0)
pageTitle=`{ echo $args|sed -e 's/ / - /g' -e 's/_/ /g' }