Skip to content

Commit 0eb2ea1

Browse files
authored
"tos" input should never be unspecified (#431)
1 parent a64bec1 commit 0eb2ea1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

webroot/panel/account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
if ($SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI)) {
7373
UnityHTTPD::badRequest("already requested to be PI");
7474
}
75-
if (!isset($_POST["tos"]) || $_POST["tos"] != "agree") {
75+
if ($_POST["tos"] != "agree") {
7676
UnityHTTPD::badRequest("user did not agree to terms of service");
7777
}
7878
$USER->getPIGroup()->requestGroup($SEND_PIMESG_TO_ADMINS);

webroot/panel/groups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
switch ($_POST["form_type"]) {
3131
case "addPIform":
3232
$pi_account = $getPIGroupFromPost();
33-
if (!isset($_POST["tos"]) || $_POST["tos"] != "agree") {
33+
if ($_POST["tos"] != "agree") {
3434
UnityHTTPD::badRequest("user did not agree to terms of service");
3535
}
3636
if ($pi_account->exists()) {

0 commit comments

Comments
 (0)