Merge pull request #1120 from misol/support_punycode_domain

fix for Not-Alphabet URL document writing (#634)
This commit is contained in:
bnu 2015-03-03 14:42:50 +09:00
commit bec1f35902
8 changed files with 4744 additions and 0 deletions

View file

@ -1567,6 +1567,13 @@ function checkCSRF()
$defaultUrl = Context::getDefaultUrl();
$referer = parse_url($_SERVER["HTTP_REFERER"]);
if(strpos(Context::getRequestUri(), 'xn--') !== FALSE)
{
require_once(_XE_PATH_ . 'libs/idna_convert/idna_convert.class.php');
$IDN = new idna_convert(array('idn_version' => 2008));
$referer = parse_url($IDN->encode($_SERVER["HTTP_REFERER"]));
}
$oModuleModel = getModel('module');
$siteModuleInfo = $oModuleModel->getDefaultMid();