summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-12-01 19:03:15 +0100
committermsquare <msquare@notrademark.de>2017-12-01 19:03:15 +0100
commit0f273988c9992b7c99a0af366b9b93b9f53ba5f8 (patch)
treeea91712d1d335ac1ea1e96dd73f07cc3418e8f43 /includes/model
parenta5f5dc52c87ed7f2389666dba9b88ae0a94bc292 (diff)
fix user nick validation, fixes #369
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/User_model.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index 26eb42c4..6cf1c2d7 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -266,14 +266,14 @@ function User_ids()
}
/**
- * Strip unwanted characters from a users nick.
- *
+ * Strip unwanted characters from a users nick. Allowed are letters, numbers, connecting punctuation and simple space.
+ * Nick is trimmed.
* @param string $nick
* @return string
*/
function User_validate_Nick($nick)
{
- return preg_replace('/([^\wüöäß. +*-]{1,})/ui', '', $nick);
+ return preg_replace('/([^\p{L}\p{N}-_ ]+)/ui', '', trim($nick));
}
/**