Skip to content

Commit

Permalink
Fix stored XSS security issue: escape HTML attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Apr 25, 2022
1 parent c6d2832 commit be5bf17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -4,6 +4,7 @@
Changes in 8.9.5
----------------
- Fix stored XSS security issue: do not allow unsanitized XML in FileUpload.fnc.php, thanks to @nhienit2010
- Fix stored XSS security issue: escape HTML attribute in StudentAssignments.fnc.php, thanks to @dungtuanha

Changes in 8.9.4
----------------
Expand Down
2 changes: 1 addition & 1 deletion modules/Grades/includes/StudentAssignments.fnc.php
Expand Up @@ -575,7 +575,7 @@ function MakeAssignmentTitle( $value, $column )
// Truncate value to 36 chars.
$title = mb_strlen( $value ) <= 36 ?
$value :
'<span title="' . $value . '">' . mb_substr( $value, 0, 33 ) . '...</span>';
'<span title="' . htmlspecialchars( $value, ENT_QUOTES ) . '">' . mb_substr( $value, 0, 33 ) . '...</span>';

if ( User( 'PROFILE' ) === 'teacher' )
{
Expand Down

0 comments on commit be5bf17

Please sign in to comment.