Skip to content

Commit

Permalink
Fixed issue #19368: [security] Simple admin can add XSS on adminemail (
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Jan 30, 2024
1 parent 81570a8 commit fb69f3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions application/models/Survey.php
Expand Up @@ -499,7 +499,9 @@ public function rules()
array('admin', 'LSYii_Validators'),
array('admin', 'length', 'min' => 1, 'max' => 50),
array('adminemail', 'filter', 'filter' => 'trim'),
array('adminemail', 'LSYii_Validators'),
array('bounce_email', 'filter', 'filter' => 'trim'),
array('bounce_email', 'LSYii_Validators'),
//array('bounce_email', 'LSYii_EmailIDNAValidator', 'allowEmpty'=>true),
array('active', 'in', 'range' => array('Y', 'N'), 'allowEmpty' => true),
array('gsid', 'numerical', 'min' => '0', 'allowEmpty' => true),
Expand Down
2 changes: 1 addition & 1 deletion themes/survey/vanilla/views/layout_errors.twig
Expand Up @@ -70,7 +70,7 @@
{{gT("For further information please contact %s:")|format (aSurveyInfo.admin)}}
{% if aSurveyInfo.adminemail %}
<br>
<a href='mailto:{{ aSurveyInfo.adminemail }}'>{{ aSurveyInfo.adminemail }}</a>
<a href='mailto:{{ aSurveyInfo.adminemail|url_encode }}'>{{ aSurveyInfo.adminemail }}</a>
{% endif %}
{% endif %}
</p>
Expand Down

0 comments on commit fb69f3f

Please sign in to comment.