The foswiki svn repository will become read-only on Friday 8/8. Developers should register for a http://github.com/ account for commit access to foswiki.

Item1332: querystrings with semicolon or & but no valid parameter assignment gives error log entries

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Engine   Main.KennethLavrsen
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

ItemTemplate edit

Summary querystrings with semicolon or & but no valid parameter assignment gives error log entries
ReportedBy KennethLavrsen
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor KennethLavrsen
Checkins Foswikirev:3195 Foswikirev:3196
TargetRelease patch
ReleasedIn 1.0.4
Topic revision: r4 - 19 Mar 2009, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License