зеркало из https://github.com/mozilla/gecko-dev.git
Boundary check for submitted ratings. See bug 356781, attachment 242375.
This commit is contained in:
Родитель
1fa7b35889
Коммит
dfa0e75dfb
|
@ -49,7 +49,7 @@ if (isset($_POST['c_submit'])) {
|
|||
// with an error message. (By using booleans here, we keep the error messages in
|
||||
// the .tpl)
|
||||
$_bad_input = false;
|
||||
if (!is_numeric($_POST['c_rating'])) {
|
||||
if (!is_numeric($_POST['c_rating']) || $_POST['c_rating'] < 0 || $_POST['c_rating'] > 5) {
|
||||
$_errors['c_rating'] = true;
|
||||
$_bad_input = true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче