Skip to content

Commit

Permalink
Item13484: Fix template syntax, and a taint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Jun 30, 2015
1 parent de6d605 commit e55c50f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NatEditPlugin/templates/edit.natedit.tmpl
Expand Up @@ -45,7 +45,7 @@
<input type="hidden" name="action_checkpoint" value="" />
<input type="hidden" name="action_preview" value="" />
<input type="hidden" name="action_replaceform" value="" />
<input type="hidden" name="editaction" value=%IF{"$'action'='form'" then="form" else=""}% />
<input type="hidden" name="editaction" value="%IF{"$'action'='form'" then="form" else=""}%" />
<input type="hidden" name="action_save" value="" />%TMPL:END%

%TMPL:DEF{"textarea"}%<textarea id="topic" class="foswikiTextarea foswikiWysiwygEdit natedit" data-rest-params="?%NONCE%" data-auto-max-expand="true" data-min-height="230" data-min-height="300" %TMPL:P{"natedit::options"}% name="text">%TEXT%</textarea>%TMPL:END%
Expand Down
4 changes: 3 additions & 1 deletion core/lib/Foswiki/UI/Edit.pm
Expand Up @@ -53,7 +53,9 @@ sub init_edit {

# empty means edit both form and text, "form" means edit form only,
# "text" means edit text only
my $editaction = lc( $query->param('action') || '' );
my $editaction = $query->param('action') || '';
$editaction =~ m/^(form|text)$/i;
$editaction = lc( $1 || '' );

my $adminCmd = $query->param('cmd') || '';
my $redirectTo = $query->param('redirectto') || '';
Expand Down

0 comments on commit e55c50f

Please sign in to comment.