-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2897 from spryker/bugfix/core-2145-xss-injection
core-2145: fix XSS in zed customer view page
- Loading branch information
Showing
6 changed files
with
97 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/Spryker/Zed/Customer/Dependency/Service/CustomerToUtilSanitizeBridge.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Copyright © 2017-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Zed\Customer\Dependency\Service; | ||
|
||
class CustomerToUtilSanitizeBridge implements CustomerToUtilSanitizeInterface | ||
{ | ||
/** | ||
* @var \Spryker\Service\UtilSanitize\UtilSanitizeServiceInterface | ||
*/ | ||
protected $utilSanitizeService; | ||
|
||
/** | ||
* @param \Spryker\Service\UtilSanitize\UtilSanitizeServiceInterface $utilSanitizeService | ||
*/ | ||
public function __construct($utilSanitizeService) | ||
{ | ||
$this->utilSanitizeService = $utilSanitizeService; | ||
} | ||
|
||
/** | ||
* @param string $text | ||
* @param bool $double | ||
* @param string|null $charset | ||
* | ||
* @return string | ||
*/ | ||
public function escapeHtml($text, $double = true, $charset = null) | ||
{ | ||
return $this->utilSanitizeService->escapeHtml($text, $double, $charset); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Spryker/Zed/Customer/Dependency/Service/CustomerToUtilSanitizeInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Copyright © 2017-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Zed\Customer\Dependency\Service; | ||
|
||
interface CustomerToUtilSanitizeInterface | ||
{ | ||
/** | ||
* @param string $text | ||
* @param bool $double | ||
* @param string|null $charset | ||
* | ||
* @return string | ||
*/ | ||
public function escapeHtml($text, $double = true, $charset = null); | ||
} |