Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from Mik317/master
Browse files Browse the repository at this point in the history
[FIX] XSS through blacklisting and htmlentities()
  • Loading branch information
JamieSlome authored Aug 20, 2020
2 parents b645d2a + e3f5a5e commit 2c73c10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/class/uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ public function __construct() {
// HOST APPLICATIONS INIT
if (isset($_GET['CKEditorFuncNum'])) {
$this->opener['name'] = "ckeditor";
$this->opener['CKEditor'] = array('funcNum' => $_GET['CKEditorFuncNum']);
$malicious = array("(", ")", ";", "=", "-", "*", "/", "+", "!", "@", "#", "%", "^", "&", "`", "'", "\"");
$this->opener['CKEditor'] = array('funcNum' => htmlentities(str_replace($malicious, '', $_GET['CKEditorFuncNum']), ENT_QUOTES, 'UTF-8'));

} elseif (isset($_GET['opener'])) {
$this->opener['name'] = $_GET['opener'];
Expand Down

0 comments on commit 2c73c10

Please sign in to comment.