Skip to content

Commit

Permalink
Fix Stored XSS security issue: escape textarea HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed May 7, 2022
1 parent d6e4dae commit 069e30a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
@@ -1,6 +1,10 @@
# CHANGES
## RosarioSIS Student Information System

Changes in 8.9.6
----------------
- Fix Stored XSS security issue: escape textarea HTML in Inputs.php, thanks to @jo125ker

Changes in 8.9.5
----------------
- Fix stored XSS security issue: do not allow unsanitized XML & HTML in FileUpload.fnc.php, thanks to @nhienit2010
Expand Down
4 changes: 3 additions & 1 deletion functions/Inputs.php
Expand Up @@ -422,7 +422,9 @@ function TextAreaInput( $value, $name, $title = '', $extra = '', $div = true, $t

$textarea = ( $type === 'markdown' ? MarkDownInputPreview( $id ) : '' ) .
'<textarea id="' . $id . '" name="' . $name . '" ' . $extra . '>' .
$value . '</textarea>' . ( $type === 'tinymce' ? $ftitle_nobr : $ftitle );
// Fix Stored XSS security issue: escape textarea HTML.
htmlspecialchars( (string) $value ) .
'</textarea>' . ( $type === 'tinymce' ? $ftitle_nobr : $ftitle );

if ( $value == ''
|| ! $div )
Expand Down

0 comments on commit 069e30a

Please sign in to comment.