Skip to content

Commit

Permalink
Fixed bug #33289: ILIAS 7 XSS in erweiterter Sprachverwaltung (#4742)
Browse files Browse the repository at this point in the history
* fixed XSS, added workaround to avoid stripping of non-html characters

* changed workaround

* changed workaround
  • Loading branch information
c-knof authored Jul 11, 2022
1 parent a9eaad8 commit 6906cbf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Services/Language/classes/class.ilObjLanguageExtGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,13 @@ public function saveObject()

// example key of variable: 'common#:#access'
// example key of comment: 'common#:#access#:#comment'
$keys = explode($this->lng->separator, ilUtil::stripSlashes($key, false));
$keys = explode($this->lng->separator, ilUtil::stripSlashes($key));

if (count($keys) == 2) {
// avoid line breaks
$value = preg_replace("/(\015\012)|(\015)|(\012)/", "<br />", $value);
$value = ilUtil::stripSlashes($value, false);
$value = str_replace("<<", "«",$value);
$value = ilUtil::stripSlashes($value);
$save_array[$key] = $value;

// the comment has the key of the language with the suffix
Expand Down

0 comments on commit 6906cbf

Please sign in to comment.