mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
judge: fix key check
This commit is contained in:
1 parent
1140f85654
commit
f21ff16ef1
2 files changed
+3
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.11.3",
|
||||
"version": "2.11.4",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -229,7 +229,7 @@ export default async function readCases(folder: string, cfg: Record<string, any>
|
||||
result.subtasks = c.subtasks;
|
||||
result.count = c.count;
|
||||
}
|
||||
if (args.key && args.key !== result.key) throw new FormatError('Incorrect secret key');
|
||||
if (!args.key) isValidConfig(result);
|
||||
if (result.key && args.key !== result.key) throw new FormatError('Incorrect secret key');
|
||||
if (!result.key) isValidConfig(result);
|
||||
return result;
|
||||
}
|
||||
Reference in new issue
Block a user