Item11970: Topic names with newlines cause horrible breakage
Priority: Urgent
Current State: Waiting for Feedback
Released In: 1.2.0
Target Release: minor
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