Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor XSS issues reported in security ticket 69 #13887

Merged
merged 2 commits into from May 24, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next
Fix some minor XSS issues reported in ticket #69
  • Loading branch information
Mark-H committed May 1, 2018
commit 3241473d8213e9551cef4ed0e8ac4645cfbd10c4
Expand Up @@ -72,6 +72,7 @@ public function prepareRow(xPDOObject $object) {
if (!$object->checkPolicy('view')) return array();

$resourceArray = $object->get(array('id','pagetitle','description','published','deleted', 'context_key'));
$resourceArray['pagetitle'] = htmlspecialchars($resourceArray['pagetitle'], ENT_QUOTES, 'UTF-8');
$resourceArray['menu'] = array();
$resourceArray['menu'][] = array(
'text' => $this->modx->lexicon('resource_view'),
Expand Down
1 change: 1 addition & 0 deletions core/model/modx/processors/system/menu/getnodes.class.php
Expand Up @@ -60,6 +60,7 @@ public function prepareRow(xPDOObject $object) {
}
$text = $this->modx->lexicon($object->get('text'));
$desc = $this->modx->lexicon($object->get('description'));
$text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8');

$objectArray = array(
'text' => $text.($controller != '' ? ' <i>('.$namespace.':'.$controller.')</i>' : ''),
Expand Down
2 changes: 2 additions & 0 deletions core/model/modx/processors/system/settings/getlist.class.php
Expand Up @@ -126,6 +126,8 @@ public function prepareRow(xPDOObject $object) {
} else {
$settingArray['name'] = $settingArray['name_trans'];
}
$settingArray['key'] = htmlspecialchars($settingArray['key'], ENT_QUOTES, 'UTF-8');
$settingArray['name_trans'] = htmlspecialchars($settingArray['name_trans'], ENT_QUOTES, 'UTF-8');

$settingArray['oldkey'] = $settingArray['key'];

Expand Down