Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions core/src/Revolution/modDashboardWidgetInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ public function process() {
$output = $this->render();
} catch (Throwable $t) {
$this->controller->setPlaceholder('_e', [
'message' => $t->getMessage(),
'errors' => explode("\n", $t->getTraceAsString()),
'message' => htmlspecialchars($t->getMessage(), ENT_QUOTES),
'errors' => htmlspecialchars(
explode("\n", $t->getTraceAsString()),
ENT_QUOTES
),
]);
$output = $this->controller->fetchTemplate('error.tpl');
}
Expand Down
7 changes: 6 additions & 1 deletion core/src/Revolution/modManagerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@

$tpl = $this->getTemplateFile();
if ($this->isFailure) {
$this->setPlaceholder('_e', $this->modx->error->failure($this->failureMessage));
$this->setPlaceholder('_e',

Check failure on line 208 in core/src/Revolution/modManagerController.php

View workflow job for this annotation

GitHub Actions / phpcs

Opening parenthesis of a multi-line function call must be the last content on the line
filter_var_array(
$this->modx->error->failure($this->failureMessage),
FILTER_SANITIZE_FULL_SPECIAL_CHARS
)
);
$content = $this->fetchTemplate('error.tpl');
} else {
if (!empty($tpl)) {
Expand Down
7 changes: 6 additions & 1 deletion core/src/Revolution/modManagerResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,12 @@
public function send()
{
if (is_array($this->body)) {
$this->modx->smarty->assign('_e', $this->body);
$this->modx->smarty->assign('_e',

Check failure on line 188 in core/src/Revolution/modManagerResponse.php

View workflow job for this annotation

GitHub Actions / phpcs

Opening parenthesis of a multi-line function call must be the last content on the line
filter_var_array(
$this->body,
FILTER_SANITIZE_FULL_SPECIAL_CHARS
)
);
if (!file_exists($this->modx->smarty->template_dir . 'error.tpl')) {
$templatePath = $this->modx->getOption('manager_path') . 'templates/default/';
$this->modx->smarty->setTemplatePath($templatePath);
Expand Down
Loading