간단한 XSS 시도 체크 기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2270 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-09 06:03:06 +00:00
parent 109c58d126
commit 054e41fbbc
2 changed files with 11 additions and 2 deletions

View file

@ -85,6 +85,9 @@
}
}
if(!in_array($this->lang_type, $lang_supported)) $this->lang_type = $this->db_info->lang_type;
if(!$this->lang_type) $this->lang_type = "en";
Context::set('lang_supported', $lang_supported);
$this->setLangType($this->lang_type);
@ -402,6 +405,7 @@
if(!count($_REQUEST)) return;
foreach($_REQUEST as $key => $val) {
if($key == "page" || substr($key,-3)=="srl") $val = (int)$val;
if(is_array($val)) {
for($i=0;$i<count($val);$i++) {
if(get_magic_quotes_gpc()) $val[$i] = stripslashes($val[$i]);