Skip to content

Commit

Permalink
Corrected XSS vuln in title param
Browse files Browse the repository at this point in the history
( reported in claudehohl#556 )
  • Loading branch information
krayon committed Jan 31, 2022
1 parent 5f5a083 commit 657256e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion htdocs/themes/bootstrap/views/defaults/paste_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
<label for="title">
<?php echo lang('paste_title'); ?>
</label>
<input value="<?php if(isset($title_set)){ echo $title_set; }?>" class="span3" type="text" id="title" name="title" tabindex="2" maxlength="50" />
<?php $set = array('name' => 'title', 'id' => 'title', 'class' => 'span3', 'value' => (isset($title_set) ? $title_set : ''), 'maxlength' => '50', 'tabindex' => '2');
echo form_input($set);?>
</div>
<div class="span3">
<label for="lang">
Expand Down
3 changes: 2 additions & 1 deletion htdocs/themes/cleanwhite/views/defaults/paste_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<span class="instruction"><?php echo lang('paste_title_desc'); ?></span>
</label>

<input value="<?php if(isset($title_set)){ echo $title_set; }?>" type="text" id="title" name="title" tabindex="2" maxlength="50" />
<?php $set = array('name' => 'title', 'id' => 'title', 'value' => (isset($title_set) ? $title_set : ''), 'maxlength' => '50', 'tabindex' => '2');
echo form_input($set);?>
</div>

<div class="item last">
Expand Down
3 changes: 2 additions & 1 deletion htdocs/themes/default/views/defaults/paste_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
<label for="title"><?php echo lang('paste_title'); ?>
<span class="instruction"><?php echo lang('paste_title_desc'); ?></span>
</label>
<input value="<?php if(isset($title_set)){ echo $title_set; }?>" type="text" id="title" name="title" tabindex="2" maxlength="50" />
<?php $set = array('name' => 'title', 'id' => 'title', 'value' => (isset($title_set) ? $title_set : ''), 'maxlength' => '50', 'tabindex' => '2');
echo form_input($set);?>
</div>

<div class="item last">
Expand Down
3 changes: 2 additions & 1 deletion htdocs/themes/geocities/views/defaults/paste_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<?php echo lang('paste_title'); ?>
</label>

<input value="<?php if(isset($title_set)){ echo $title_set; }?>" class="span3" type="text" id="title" name="title" tabindex="2" maxlength="50" />
<?php $set = array('name' => 'title', 'id' => 'title', 'class' => 'span3', 'value' => (isset($title_set) ? $title_set : ''), 'maxlength' => '50', 'tabindex' => '2');
echo form_input($set);?>
</div>

<div class="span3">
Expand Down
3 changes: 2 additions & 1 deletion htdocs/themes/i386/views/defaults/paste_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<?php echo lang('paste_title'); ?>
</label>

<input value="<?php if(isset($title_set)){ echo $title_set; }?>" class="span3" type="text" id="title" name="title" tabindex="2" maxlength="50" />
<?php $set = array('name' => 'title', 'id' => 'title', 'class' => 'span3', 'value' => (isset($title_set) ? $title_set : ''), 'maxlength' => '50', 'tabindex' => '2');
echo form_input($set);?>
</div>

<div class="span3">
Expand Down
3 changes: 2 additions & 1 deletion htdocs/themes/stikkedizr/views/defaults/paste_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<label for="title">
<i class="fa fa-flag"></i> <?php echo lang('paste_title'); ?>
</label>
<input value="<?php if(isset($title_set)){ echo $title_set; }?>" class="form-control" type="text" id="title" name="title" tabindex="2" maxlength="50" />
<?php $set = array('name' => 'title', 'id' => 'title', 'class' => 'form-control', 'value' => (isset($title_set) ? $title_set : ''), 'maxlength' => '50', 'tabindex' => '2');
echo form_input($set);?>
</div>

<div class="col-3 col-sm-12 col-lg-3">
Expand Down

0 comments on commit 657256e

Please sign in to comment.