chore(submission): disable hack for remote submissions

This commit is contained in:
Baoshuo Ren 2023-03-28 21:05:39 +08:00
parent 8b6ce05198
commit 04ab18076b
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 5 additions and 0 deletions

View File

@ -109,6 +109,7 @@ function handleUpload($zip_file_name, $content, $tot_size) {
if (UOJProblem::info('type') == 'remote') { if (UOJProblem::info('type') == 'remote') {
$submit_type = in_array($_POST['answer_remote_submit_type'], $remote_provider['submit_type']) ? $_POST['answer_remote_submit_type'] : $remote_provider['submit_type'][0]; $submit_type = in_array($_POST['answer_remote_submit_type'], $remote_provider['submit_type']) ? $_POST['answer_remote_submit_type'] : $remote_provider['submit_type'][0];
$content['remote_judge'] = true;
$content['config'][] = ['remote_submit_type', $submit_type]; $content['config'][] = ['remote_submit_type', $submit_type];
if ($submit_type != 'bot') { if ($submit_type != 'bot') {

View File

@ -480,6 +480,10 @@ class UOJSubmission {
} }
public function preHackCheck(array $user = null) { public function preHackCheck(array $user = null) {
if ($this->getContent('remote_judge')) {
return false;
}
return $this->info['score'] == 100 && $this->problem->preHackCheck($user); return $this->info['score'] == 100 && $this->problem->preHackCheck($user);
} }