mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 23:58:41 +00:00
fix: return 403 if problem is used in a registered running contest
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ef774d2e97
commit
1ecf764bb7
@ -12,6 +12,17 @@
|
|||||||
become403Page();
|
become403Page();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$solutions = DB::selectAll("select * from problems_solutions where blog_id = {$blog['id']}");
|
||||||
|
if ($solutions) {
|
||||||
|
foreach ($solutions as $solution) {
|
||||||
|
$problem = queryProblemBrief($solution['problem_id']);
|
||||||
|
|
||||||
|
if (!hasProblemPermission($myUser, $problem) && isRegisteredRunningContestProblem($myUser, $problem)) {
|
||||||
|
become403Page();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($_COOKIE['bootstrap4'])) {
|
if (!isset($_COOKIE['bootstrap4'])) {
|
||||||
$REQUIRE_LIB['bootstrap5'] = '';
|
$REQUIRE_LIB['bootstrap5'] = '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user