From 3d63a011aca9a79be7deb349d04b27f1c5dc21fb Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Mon, 6 Feb 2023 10:15:15 +0800 Subject: [PATCH] fix: 779480060355d8b2a018f290048218144a560c53 --- web/app/controllers/problem.php | 4 ++-- web/app/controllers/submission.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php index cfd085b..120b17d 100644 --- a/web/app/controllers/problem.php +++ b/web/app/controllers/problem.php @@ -241,10 +241,10 @@ if ($pre_submit_check_ret === true && !$no_more_submission) { return in_array($opt, $remote_provider['submit_type']) ? '' : '无效选项'; }, null); $answer_form->add('answer_remote_account_data', '', function ($data) { - return json_decode($data) !== null ? '' : '无效数据'; + return $_POST['answer_remote_submit_type'] == 'bot' || json_decode($data) !== null ? '' : '无效数据'; }, null); $answer_form->add('answer_remote_submission_id', '', function ($id) { - return validateUInt($id) ? '' : '无效 ID'; + return $_POST['answer_remote_submit_type'] != 'archive' || validateUInt($id) ? '' : '无效 ID'; }, null); $answer_form->appendHTML(<<Remote Judge 配置 diff --git a/web/app/controllers/submission.php b/web/app/controllers/submission.php index 4ce2e96..f89c9dc 100644 --- a/web/app/controllers/submission.php +++ b/web/app/controllers/submission.php @@ -168,7 +168,7 @@ if ($perm['manager_view']) { ?> -
+
echoContent() ?>