Item1332: querystrings with semicolon or & but no valid parameter assignment gives error log entries
Priority: Normal
Current State: Closed
Released In: 1.0.4
Target Release: patch
Applies To: Engine
Component:
Branches:
Especially Google like to play games with silly URLs like
http://mydomain.com/foswiki/bin/view/Myweb/Mytopic?;hello=hej
The first semicolon sort of means nothing = nothing.
You can also see examples like
http://mydomain.com/foswiki/bin/view/Myweb/Mytopic?=ho;hello=hej
Here we have a value but no variable
http://mydomain.com/foswiki/bin/view/Myweb/Mytopic?hello=
is a valid URL and should be seen has hello=''
Foswiki works fine with empty value but either no variable or completely blank gives warnings about
view: Use of uninitialized value in transliteration (tr///) at /var/www/foswiki10/lib/Foswiki/Engine.pm line 152.
view: Use of uninitialized value in substitution (s///) at /var/www/foswiki10/lib/Foswiki/Engine.pm line 153.
view: Use of uninitialized value in hash element at /var/www/foswiki10/lib/Foswiki/Engine.pm line 158.
view: Use of uninitialized value in hash element at /var/www/foswiki10/lib/Foswiki/Engine.pm line 162.
Fix is easy.
I am checking in this code and let someone review it carefully and naturally run unit tests and making this one in 1.0.4. There is nothing more ugly than an error_log full of uninitialized value statements so let is limit them.
--
KennethLavrsen - 19 Mar 2009