Ignore:
Timestamp:
06/04/09 00:08:33 (3 years ago)
Author:
KennethLavrsen
Message:

Item1640: CommentPlugin writes "%" as html-code, which prevents the use of Macros
It was me that created the problem with my default safe mode in URLPARAM
I have analysed the problem and as long as we use URLPARAM in the OUTPUT part of
the CommentPlugin templates and keep the settings inside verbatim tags we do not
expose any XSS attack. So we can give the users back the ability to use Foswiki
Macros in comment input fields.
With this I also merge over some code changes Crawford had done in trunk.
Note that except for the release version all changes in the .pm files are unrelated
to the bug fix, which is why I dare checking in perltidy stuff with a bug fix.
CommentPlugin is now again same in trunk and Release branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x00/CommentPlugin/lib/Foswiki/Plugins/CommentPlugin.pm

    r1952 r4026  
    1313 
    1414our $VERSION = '$Rev$'; 
    15 our $RELEASE = 'Foswiki-1.0.1'; 
    16 our $SHORTDESCRIPTION = 'Quickly post comments to a page without an edit/preview/save cycle'; 
     15our $RELEASE = '04 Jun 2009'; 
     16our $SHORTDESCRIPTION = 
     17  'Quickly post comments to a page without an edit/preview/save cycle'; 
    1718our $NO_PREFS_IN_TOPIC = 1; 
    1819 
     
    2829 
    2930    my $query = Foswiki::Func::getCgiQuery(); 
    30     return unless( defined( $query )); 
     31    return unless( defined( $query ) ); 
    3132 
    3233    return unless $_[0] =~ m/%COMMENT({.*?})?%/o; 
     
    3435    # SMELL: Nasty, tacky way to find out where we were invoked from 
    3536    my $scriptname = $ENV{'SCRIPT_NAME'} || ''; 
     37 
    3638    # SMELL: unreliable 
    37     my $previewing = ($scriptname =~ /\/(preview|gnusave|rdiff|compare)/); 
     39    my $previewing = ( $scriptname =~ /\/(preview|gnusave|rdiff|compare)/ ); 
    3840    Foswiki::Plugins::CommentPlugin::Comment::prompt( $previewing, 
    3941                                                    $_[0], $web, $topic ); 
Note: See TracChangeset for help on using the changeset viewer.