增加前端上传签名
parent
133bd5c03a
commit
a7ab58f4b9
|
@ -28,7 +28,7 @@ if (empty($_FILES['file'])) {
|
|||
}
|
||||
|
||||
// sign
|
||||
if (empty($_POST['sign']) || $_POST['sign'] !== md5($config['password'] . date('YmdH'))) {
|
||||
if (empty($_REQUEST['sign']) || $_REQUEST['sign'] !== date('YmdH')) {
|
||||
exit(json_encode(array(
|
||||
"result" => "failed",
|
||||
"code" => 403,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
* 2023-03-06 v2.7.8
|
||||
- 增加前端上传签名
|
||||
- 增加WEB端上传签名
|
||||
|
||||
* 2023-03-05 v2.7.7
|
||||
- 增加登录日志
|
||||
|
|
|
@ -130,7 +130,8 @@ mustLogin();
|
|||
flash_swf_url: '<?php static_cdn(); ?>/public/static/zui/lib/uploader/Moxie.xap',
|
||||
// sign
|
||||
multipart_params: {
|
||||
'sign': '<?php echo md5($config['password'] . date('YmdH')); ?>', // new Date().format("YYYYMMddhh")
|
||||
// 'sign': new Date().format("YYYYMMddhh"),
|
||||
'sign': new Date().format("YYYYMMddhh"),
|
||||
},
|
||||
// 预览图尺寸
|
||||
previewImageSize: {
|
||||
|
|
|
@ -287,7 +287,7 @@ $('#btnLinks, #btnBbscode, #btnMarkDown, #btnHtml, #btnThumb, #btnDel').on('clic
|
|||
placement: 'top'
|
||||
});
|
||||
};
|
||||
xhr.open('POST', './application/upload.php', true);
|
||||
xhr.open('POST', './application/upload.php?sign=' + new Date().format("YYYYMMddhh"), true);
|
||||
xhr.send(formData);
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue