mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 17:38:19 +08:00
core: fix OI mode contest score leak (#860)
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
1 parent
d33a3a1fb0
commit
e274330191
1 file changed
+2
-1
@@ -222,7 +222,7 @@ export class ContestProblemListHandler extends ContestDetailBaseHandler {
|
||||
contest.getMultiClarification(domainId, tid, this.user._id),
|
||||
]);
|
||||
this.response.body = {
|
||||
pdict, psdict: {}, udict, rdict: {}, tdoc: this.tdoc, tsdoc: this.tsdoc, tcdocs,
|
||||
pdict, psdict: {}, udict, rdict: {}, tdoc: this.tdoc, tcdocs,
|
||||
};
|
||||
this.response.template = 'contest_problemlist.html';
|
||||
this.response.body.showScore = Object.values(this.tdoc.score || {}).some((i) => i && i !== 100);
|
||||
@@ -231,6 +231,7 @@ export class ContestProblemListHandler extends ContestDetailBaseHandler {
|
||||
await contest.setStatus(domainId, tid, this.user._id, { startAt: new Date() });
|
||||
this.tsdoc.startAt = new Date();
|
||||
}
|
||||
this.response.body.tsdoc = pick(this.tsdoc, ['attend', 'startAt', ...(this.tdoc.duration ? ['endAt'] : [])]);
|
||||
this.response.body.psdict = this.tsdoc.detail || {};
|
||||
const psdocs: any[] = Object.values(this.response.body.psdict);
|
||||
const canViewRecord = contest.canShowSelfRecord.call(this, this.tdoc);
|
||||
|
||||
Reference in new issue
Block a user