mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-10 17:42:50 +00:00
增加过滤参数,防止sql注入
This commit is contained in:
parent
d8c86a5d5f
commit
18b3f227e8
@ -32,6 +32,7 @@ class SystemDatabackup extends AuthController
|
||||
'level' => 5,
|
||||
);
|
||||
$this->DB = new Backup($config);
|
||||
$this->request->filter(['htmlspecialchars', 'strip_tags', 'addslashes', 'trim']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -351,6 +351,7 @@
|
||||
},
|
||||
mounted:function () {
|
||||
this.getBadge();
|
||||
var that = this;
|
||||
layList.laydate.render({
|
||||
elem:this.$refs.date_time,
|
||||
trigger:'click',
|
||||
|
||||
@ -52,7 +52,7 @@ class AllowOriginMiddleware implements MiddlewareInterface
|
||||
} else {
|
||||
$response = $next($request)->header($header);
|
||||
}
|
||||
|
||||
$request->filter(['htmlspecialchars', 'strip_tags', 'addslashes', 'trim']);
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
@ -417,7 +417,7 @@ class UploadService
|
||||
};
|
||||
$fileName = Filesystem::putFile($this->uploadPath, $file);
|
||||
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