aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-03-29 19:30:28 +0000
committerpatdenice <patdenice@piwigo.org>2011-03-29 19:30:28 +0000
commit1ab138e7317ad80b128ec9d8819a3c70ca0469fd (patch)
tree858cb45a9ba902d813fa50a30fde2adfa17f0b6b
parent526074d7d6802f4c2f8bb36375292480a7c9f473 (diff)
bug:2234
HTML characters are allowed in username git-svn-id: http://piwigo.org/svn/trunk@9923 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/functions_user.inc.php4
-rw-r--r--language/en_UK/common.lang.php1
-rw-r--r--language/fr_FR/common.lang.php1
3 files changed, 6 insertions, 0 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index cc8562323..549daf7cb 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -112,6 +112,10 @@ function register_user($login, $password, $mail_address,
{
array_push($errors, l10n('this login is already used'));
}
+ if ($login != strip_tags($login))
+ {
+ array_push($errors, l10n('html tags are not allowed in login'));
+ }
$mail_error = validate_mail_address(null, $mail_address);
if ('' != $mail_error)
{
diff --git a/language/en_UK/common.lang.php b/language/en_UK/common.lang.php
index ac792a23a..97f528c61 100644
--- a/language/en_UK/common.lang.php
+++ b/language/en_UK/common.lang.php
@@ -358,4 +358,5 @@ $lang['This author modified following comment:'] = 'This author modified followi
$lang['This author removed the comment with id %d'] = 'This author removed the comment with id %d';
$lang['delete this comment'] = "delete this comment";
$lang['validate this comment'] = 'validate this comment';
+$lang['html tags are not allowed in login'] = 'html tags are not allowed in login';
?> \ No newline at end of file
diff --git a/language/fr_FR/common.lang.php b/language/fr_FR/common.lang.php
index 09a563cec..10b393f8f 100644
--- a/language/fr_FR/common.lang.php
+++ b/language/fr_FR/common.lang.php
@@ -358,4 +358,5 @@ $lang['This author modified following comment:'] = 'Cet auteur a modifié le com
$lang['This author removed the comment with id %d'] = 'Cet auteur a supprimé le commentaire portant l\'identifiant %d';
$lang['delete this comment'] = "supprimer ce commentaire";
$lang['validate this comment'] = 'valider ce commentaire';
+$lang['html tags are not allowed in login'] = 'les balises html ne sont pas autorisées dans le login';
?> \ No newline at end of file