Created
April 24, 2015 04:08
-
-
Save yungke/92836b1a018b932b7b61 to your computer and use it in GitHub Desktop.
Discuz X3.2 facebook 連結至 discuz 的錯誤修正
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
private function _xss_check() { | |
$_SERVER['REQUEST_URI'] = preg_replace("/(&|\?)fb_action(.*?)$/i", "", $_SERVER['REQUEST_URI']); | |
$temp = strtoupper(urldecode(urldecode($_SERVER['REQUEST_URI']))); | |
if(strpos($temp, '<') !== false || strpos($temp, '"') !== false || strpos($temp, 'CONTENT-TRANSFER-ENCODING') !== false) { | |
system_error('request_tainting'); | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment