Skip to content

Commit ebab16f

Browse files
committed
AC-1843: Fixed path traversal issue for error reporting
1 parent 8430a4d commit ebab16f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pub/errors/default/page.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<html xmlns="http://www.w3.org/1999/xhtml" >
1111
<head>
1212
<title><?= $this->pageTitle ?></title>
13-
<base href="<?= $this->escaper->escapeHtml($this->getViewFileUrl()) ?>" />
13+
<base href="<?= $this->escaper->escapeHtmlAttr($this->getViewFileUrl()) ?>" />
1414
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1515
<meta name="robots" content="*"/>
1616
<link rel="stylesheet" href="css/styles.css" type="text/css" />

pub/errors/processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public function getViewFileUrl()
270270
$errorPath = strpos($errorDir, $indexDir) === 0 ?
271271
str_replace($indexDir, '', $errorDir) : $errorPathSuffix;
272272

273-
return ltrim($this->getBaseUrl() . $errorPath . $this->_config->skin . '/','.');
273+
return $this->getBaseUrl() . $errorPath . $this->_config->skin . '/';
274274
}
275275

276276
/**

0 commit comments

Comments
 (0)