Item11970: Topic names with newlines cause horrible breakage

pencil
Priority: Urgent
Current State: Waiting for Feedback
Released In: 1.2.0
Target Release: minor
Applies To: Extension
Component: FoswikiStore
Branches:
Reported By: PaulHarvey
Waiting For: PaulHarvey
Last Change By: SvenDowideit
Don't ask me how I know

diff --git a/lib/Foswiki/Store/VC/Handler.pm b/lib/Foswiki/Store/VC/Handler.pm
index d94c791..c5da0f6 100644
--- a/lib/Foswiki/Store/VC/Handler.pm
+++ b/lib/Foswiki/Store/VC/Handler.pm
@@ -577,6 +577,8 @@ if the main file revision is required.
 
 sub getRevision {
     my ($this) = @_;
+
+    ASSERT((!defined $this->{file} || $this->{file} !~ /[\r\n]/), "File: '$this->{file}'");
     if (defined $this->{file} && -e $this->{file} ) {
         return ( readFile( $this, $this->{file} ), 1 );
     }

-- PaulHarvey - 26 Jun 2012

unit tests....

-- SvenDowideit - 08 Nov 2012

or NameFilter, or.... escape it, or...

-- SvenDowideit - 08 Nov 2012
 

ItemTemplate edit

Summary Topic names with newlines cause horrible breakage
ReportedBy PaulHarvey
Codebase trunk
SVN Range
AppliesTo Extension
Component FoswikiStore
Priority Urgent
CurrentState Waiting for Feedback
WaitingFor PaulHarvey
Checkins
TargetRelease minor
ReleasedIn 1.2.0
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
Topic revision: r2 - 08 Nov 2012, SvenDowideit
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