cross
Foswiki General Assembly will be held on 28th November 2019, 1200 UTC on Freenode IRC channel #foswiki-association. See AgendaTenthGeneralAssembly

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

pencil
Priority: Normal
Current State: Closed
Released In: 1.0.4
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: KennethLavrsen
Waiting For: Main.KennethLavrsen
Last Change By: 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 distro:114310004bfa distro:2b4717d18b65
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 Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy