Boundary check for submitted ratings. See bug 356781, attachment 242375.

This commit is contained in:
mike.morgan%oregonstate.edu 2006-10-16 04:05:45 +00:00
Родитель 1fa7b35889
Коммит dfa0e75dfb
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;
}