mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 15:31:03 +00:00
【程序目录】image_base64增加数据验证
This commit is contained in:
parent
172564b121
commit
db2116f3d3
@ -300,6 +300,9 @@ class PublicController
|
||||
['image', ''],
|
||||
['code', ''],
|
||||
], true);
|
||||
if (!preg_match('/.*(\.png|\.jpg|\.jpeg|\.gif)$/', $imageUrl) || !preg_match('/.*(\.png|\.jpg|\.jpeg|\.gif)$/', $codeUrl)) {
|
||||
return app('json')->fail(100100);
|
||||
}
|
||||
try {
|
||||
$code = CacheService::get($codeUrl, function () use ($codeUrl) {
|
||||
$codeTmp = $code = $codeUrl ? image_to_base64($codeUrl) : false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user