Created
May 19, 2016 10:15
Magento jsQuoteEscape security test
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
<?php | |
$mageFilename = dirname(__FILE__).'/app/Mage.php'; | |
require_once($mageFilename); | |
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; | |
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; | |
Mage::init($mageRunCode, $mageRunType); | |
$test = 'test\\\'+alert("powned");//'; | |
echo '<html><script>var test = \''.Mage::helper('core')->jsQuoteEscape($test).'\';</script>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment