mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-21 21:48:42 +00:00
fix(problem/manage/data): csrf token
This commit is contained in:
parent
40e01f4fb9
commit
47167a5c7a
@ -63,6 +63,8 @@ function echoFilePre($file_name) {
|
||||
|
||||
// 上传数据
|
||||
if ($_POST['problem_data_file_submit'] == 'submit') {
|
||||
crsf_defend();
|
||||
|
||||
if ($_FILES["problem_data_file"]["error"] > 0) {
|
||||
$errmsg = "Error: " . $_FILES["problem_data_file"]["error"];
|
||||
UOJResponse::message('<div>' . HTML::escape($errmsg) . '</div><a href="">返回</a>');
|
||||
@ -625,6 +627,7 @@ if ($problem['hackable']) {
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="" method="post" enctype="multipart/form-data" role="form">
|
||||
<?= HTML::hiddenToken() ?>
|
||||
<div class="modal-body">
|
||||
<label class="form-label" for="problem_data_file">上传 zip 文件</label>
|
||||
<input class="form-control" type="file" name="problem_data_file" id="problem_data_file" accept=".zip">
|
||||
|
Loading…
Reference in New Issue
Block a user