Skip to content

Commit

Permalink
Merge commit from fork
Browse files Browse the repository at this point in the history
Escape parameters in various error output
  • Loading branch information
jpatokal authored Aug 22, 2024
2 parents 92f2431 + 36733f4 commit 3ada5ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion php/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
break;

default:
die("0;" . sprintf(_("Unknown action %s"), $type));
die("0;" . sprintf(_("Unknown action %s"), htmlspecialchars($type)));
}

// Note: Password is actually an MD5 hash of pw and username
Expand Down
2 changes: 1 addition & 1 deletion php/submit.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
break;

default:
die('0;Unknown operation ' . $param);
die('0;Unknown operation ' . htmlspecialchars($param));
}

print "$code;$msg";
2 changes: 1 addition & 1 deletion php/trip.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function failIfFalse($res, $name) {
break;

default:
die('0;Unknown operation ' . $type);
die('0;Unknown operation ' . htmlspecialchars($type));
}

failIfFalse($success, $name);
Expand Down

0 comments on commit 3ada5ee

Please sign in to comment.