Package: qa.debian.org
Severity: wishlist
User: debian-qa@lists.debian.org
Usertags: pts
Tags: patch
Please apply the below patch to the PTS apache configuration to strip
whitespace from input URLs before performing the redirects. This is
useful when copy and pasting package names and accidentally including
extra whitespace.
--- a/apache.conf
+++ b/apache.conf
@@ -15,11 +15,11 @@
RewriteEngine on
RewriteRule ^/$ /common/index.html [L,R]
RewriteRule ^/favicon\.ico$ http://www.debian.org/favicon.ico [L,R]
-RewriteRule ^/lib([^/])([^/]+)$ /lib$1/lib$1$2.html [L,R]
-RewriteRule ^/([^/])([^/]+)$ /$1/$1$2.html [L,R]
-RewriteCond %{QUERY_STRING} ^src=lib(.)(.+)$
+RewriteRule ^/\s*lib([^/])([^/]+)\s*$ /lib$1/lib$1$2.html [L,R]
+RewriteRule ^/\s*([^/])([^/]+)\s*$ /$1/$1$2.html [L,R]
+RewriteCond %{QUERY_STRING} ^src=\s*lib(.)(.+)\s*$
RewriteRule ^/common/index.html$ /lib%1/lib%1%2.html? [L,R,NE]
-RewriteCond %{QUERY_STRING} ^src=(.)(.+)$
+RewriteCond %{QUERY_STRING} ^src=\s*(.)(.+)\s*$
RewriteRule ^/common/index.html$ /%1/%1%2.html? [L,R,NE]
</VirtualHost>
--
bye,
pabs
http://wiki.debian.org/PaulWise
Attachment:
signature.asc
Description: This is a digitally signed message part