1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 19:24:01 +02:00

[ticket/9970] User language input is checked for existance

Users could select a language which did not exist in the database by altering
form fields because there was no back-end verification.

PHPBB3-9970
This commit is contained in:
Josh Woody
2011-01-05 18:48:57 -06:00
committed by Andreas Fischer
parent 7027489c8e
commit f7723b3e95
3 changed files with 32 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ class ucp_prefs
$error = validate_data($data, array(
'dateformat' => array('string', false, 1, 30),
'lang' => array('match', false, '#^[a-z0-9_\-]{2,}$#i'),
'lang' => array('language'),
'tz' => array('num', false, -14, 14),
));

View File

@@ -210,7 +210,7 @@ class ucp_register
array('email')),
'email_confirm' => array('string', false, 6, 60),
'tz' => array('num', false, -14, 14),
'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
'lang' => array('language'),
));
if (!check_form_key('ucp_register'))