修复 UC安全
This commit is contained in:
parent
c699f6025e
commit
732c58e8ff
|
@ -357,6 +357,9 @@ class base {
|
|||
}
|
||||
|
||||
function input($k) {
|
||||
if($k == 'uid' && !preg_match("/^[0-9]+$/", $this->input[$k])){
|
||||
return NULL;
|
||||
}
|
||||
return isset($this->input[$k]) ? (is_array($this->input[$k]) ? $this->input[$k] : trim($this->input[$k])) : NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ class pmmodel {
|
|||
}
|
||||
if($touids) {
|
||||
foreach($touids as $key => $value) {
|
||||
if($uid == $value || !$value) {
|
||||
if($uid == $value || !$value || !preg_match("/^[0-9]+$/", $value)) {
|
||||
return false;
|
||||
}
|
||||
$relastionship[] = $this->relationship($uid, $value);
|
||||
|
|
Loading…
Reference in New Issue