mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 13:52:24 +09:00
xss defense
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9888 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f26ebab5ed
commit
04e69878d0
1 changed files with 1 additions and 0 deletions
|
|
@ -721,6 +721,7 @@ class Context {
|
|||
**/
|
||||
function _filterRequestVar($key, $val, $do_stripslashes = 1) {
|
||||
if( ($key == 'page' || $key == 'cpage' || substr($key,-3)=='srl')) return !preg_match('/^[0-9,]+$/',$val)?(int)$val:$val;
|
||||
if($key == 'mid' || $key == 'vid' || $key == 'search_keyword') return htmlspecialchars($val);
|
||||
if(is_array($val) && count($val) ) {
|
||||
foreach($val as $k => $v) {
|
||||
if($do_stripslashes && version_compare(PHP_VERSION, '5.9.0', '<') && get_magic_quotes_gpc()) $v = stripslashes($v);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue