mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-12 11:09:23 +00:00
增加过滤参数,防止sql注入
This commit is contained in:
parent
d8c86a5d5f
commit
18b3f227e8
@ -32,6 +32,7 @@ class SystemDatabackup extends AuthController
|
|||||||
'level' => 5,
|
'level' => 5,
|
||||||
);
|
);
|
||||||
$this->DB = new Backup($config);
|
$this->DB = new Backup($config);
|
||||||
|
$this->request->filter(['htmlspecialchars', 'strip_tags', 'addslashes', 'trim']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -351,6 +351,7 @@
|
|||||||
},
|
},
|
||||||
mounted:function () {
|
mounted:function () {
|
||||||
this.getBadge();
|
this.getBadge();
|
||||||
|
var that = this;
|
||||||
layList.laydate.render({
|
layList.laydate.render({
|
||||||
elem:this.$refs.date_time,
|
elem:this.$refs.date_time,
|
||||||
trigger:'click',
|
trigger:'click',
|
||||||
|
|||||||
@ -52,7 +52,7 @@ class AllowOriginMiddleware implements MiddlewareInterface
|
|||||||
} else {
|
} else {
|
||||||
$response = $next($request)->header($header);
|
$response = $next($request)->header($header);
|
||||||
}
|
}
|
||||||
|
$request->filter(['htmlspecialchars', 'strip_tags', 'addslashes', 'trim']);
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -417,7 +417,7 @@ class UploadService
|
|||||||
};
|
};
|
||||||
$fileName = Filesystem::putFile($this->uploadPath, $file);
|
$fileName = Filesystem::putFile($this->uploadPath, $file);
|
||||||
if (!$fileName) return self::setError('图片上传失败!');
|
if (!$fileName) return self::setError('图片上传失败!');
|
||||||
return self::successful(str_replace('\\', '/', $fileName));
|
return self::successful(str_replace('\\', '/', ($this->uploadPath ? $this->uploadPath . '/' : '') . $fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user