NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item1300: Foswiki::Store::createWeb uses hash values as keys when changing WebPreferences

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Engine Store  
Foswiki::Store.pm, line 1780 contains the following:
foreach my $key (%$opts) {
    $text =~
      s/($Foswiki::regex{setRegex}$key\s*=).*?$/$1 $opts->{$key}/gm;
}

This caused "Use of uninitialized value in concatenation (.) or string at .../lib/Foswiki/Store.pm line 1781." in my Apache log when I tried to create a web.

I think that should be foreach my $key (keys %$opts) {

-- MichaelTempest

Elevating to urgent as this is a potential major failure for users creating webs

-- KennethLavrsen - 15 Mar 2009

Use of %$opts this way iterates the values and the keys in the hash. Since the action of the loop is to substitute existing key values, it would require a value to have the same name as an existing Set key for this to go wrong, which is highly unlikely.

Confirmed that the code is wrong, but this is not a release blocker. Lowering to Normal.

-- CrawfordCurrie - 16 Mar 2009

ItemTemplate edit

Summary Foswiki::Store::createWeb uses hash values as keys when changing WebPreferences
ReportedBy MichaelTempest
Codebase 1.0.3
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component Store
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:3127 Foswikirev:3128
TargetRelease patch
ReleasedIn 1.0.4
Topic revision: r7 - 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 LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads