--- lib/TWiki/Store.pm.orig2 Thu Sep 8 23:10:58 2005 +++ lib/TWiki/Store.pm Tue Sep 20 17:19:49 2005 @@ -278,7 +278,9 @@ my( $theWeb, $theTopic, $theRev ) = @_; my $topicHandler = _getTopicHandler( $theWeb, $theTopic ); - $theRev =~ s/^1\.//o; + $theRev =~ s/^r?1\.//o; # cut 'r' and major + # Fix for Codev.SecurityAlertExecuteCommandsWithInclude + $theRev = "" unless( $theRev =~ s/^.*?([0-9]+).*$/$1/so ); return $topicHandler->getRevision( $theRev ); } @@ -288,7 +290,9 @@ my ( $theWeb, $theTopic, $theAttachment, $theRev ) = @_; my $topicHandler = _getTopicHandler( $theWeb, $theTopic, $theAttachment ); - $theRev =~ s/^1\.//o; + $theRev =~ s/^r?1\.//o; # cut 'r' and major + # Fix for Codev.SecurityAlertExecuteCommandsWithInclude + $theRev = "" unless( $theRev =~ s/^.*?([0-9]+).*$/$1/so ); return $topicHandler->getRevision( $theRev ); } @@ -352,9 +356,9 @@ $theWebName = $TWiki::webName; } - $theRev =~ s/r?1\.//o; # cut 'r' and major + $theRev =~ s/^r?1\.//o; # cut 'r' and major # Fix for Codev.SecurityAlertExecuteCommandsWithRev - $theRev = "" unless( $theRev =~ s/.*?([0-9]+).*/$1/o ); + $theRev = "" unless( $theRev =~ s/^.*?([0-9]+).*$/$1/so ); $topicHandler = _getTopicHandler( $theWebName, $theTopic, $attachment ) if( ! $topicHandler ); my( $rcsOut, $rev, $date, $user, $comment ) = $topicHandler->getRevisionInfo( $theRev ); --- bin/rdiff.orig2 Thu Sep 8 23:18:05 2005 +++ bin/rdiff Tue Sep 20 17:31:11 2005 @@ -156,8 +156,8 @@ $rev1 =~ s/r?1\.//go; # cut 'r' and major $rev2 =~ s/r?1\.//go; # cut 'r' and major # Fix for Codev.SecurityAlertExecuteCommandsWithRev - $rev1 = $maxrev unless( $rev1 =~ s/.*?([0-9]+).*/$1/o ); - $rev2 = $maxrev unless( $rev2 =~ s/.*?([0-9]+).*/$1/o ); + $rev1 = $maxrev unless( $rev1 =~ s/^.*?([0-9]+).*$/$1/so ); + $rev2 = $maxrev unless( $rev2 =~ s/^.*?([0-9]+).*$/$1/so ); if( $rev1 < 1 ) { $rev1 = $maxrev; } if( $rev1 > $maxrev ) { $rev1 = $maxrev; } if( $rev2 < 1 ) { $rev2 = 1; } --- bin/view.orig2 Thu Sep 8 23:13:47 2005 +++ bin/view Tue Sep 20 17:31:33 2005 @@ -124,7 +124,7 @@ if( $rev ) { $rev =~ s/r?1\.//go; # cut 'r' and major # Fix for Codev.SecurityAlertExecuteCommandsWithRev - $rev = $maxrev unless( $rev =~ s/.*?([0-9]+).*/$1/o ); + $rev = $maxrev unless( $rev =~ s/^.*?([0-9]+).*$/$1/so ); if( $rev < 1 ) { $rev = 1; } if( $rev > $maxrev ) { $rev = $maxrev; } } else { --- bin/viewfile.orig2 Thu Sep 8 23:14:54 2005 +++ bin/viewfile Tue Sep 20 17:31:54 2005 @@ -65,7 +65,7 @@ my $rev = $query->param( 'rev' ) || ""; $rev =~ s/r?1\.//o; # cut 'r' and major # Fix for Codev.SecurityAlertExecuteCommandsWithRev - $rev = "" unless( $rev =~ s/.*?([0-9]+).*/$1/o ); + $rev = "" unless( $rev =~ s/^.*?([0-9]+).*$/$1/so ); my $topRev = &TWiki::Store::getRevisionNumber( $webName, $topic, $fileName ); if( ( $rev ) && ( $rev ne $topRev ) ) {