core: limit export contest code

This commit is contained in:
undefined committed 2021-06-30 17:59:08 +08:00
1 parent 3761a5c77d
commit c2cef76663
4 files changed
+10 -5

No files matched your search

+3
View File
@@ -382,6 +382,9 @@ export class ContestCodeHandler extends Handler {
}
await this.limitRate('homework_code', 3600, 60);
const [tdoc, tsdocs] = await contest.getAndListStatus(domainId, tid);
if (!contest.canShowRecord.call(this, tdoc as any, true)) {
throw new PermissionError(PERM.PERM_VIEW_CONTEST_HIDDEN_SCOREBOARD);
}
const rnames = {};
for (const tsdoc of tsdocs) {
for (const pid in tsdoc.detail || {}) {