summaryrefslogtreecommitdiff
path: root/app/Controllers/userController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-04-27 20:25:26 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-04-27 20:25:26 +0200
commit1e5b151d88cfe25391a1daf77da99b81cf6f8414 (patch)
treee08b718816125809d8514d87745a80bedc6def44 /app/Controllers/userController.php
parented99245810fce469b30c946e7fc405887c2a5b61 (diff)
Work around for IE / Edge pattern bug
Swap order of regex alternatives https://github.com/FreshRSS/FreshRSS/issues/1511 http://stackoverflow.com/questions/22360235/do-browsers-support-different-html5-pattern-regexp-features https://connect.microsoft.com/ie/feedback/details/836117/regex-bug-in-pattern-validator
Diffstat (limited to 'app/Controllers/userController.php')
-rw-r--r--app/Controllers/userController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php
index ed30eb69f..3cbbd8633 100644
--- a/app/Controllers/userController.php
+++ b/app/Controllers/userController.php
@@ -38,7 +38,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
* The username is also used as folder name, file name, and part of SQL table name.
* '_' is a reserved internal username.
*/
- const USERNAME_PATTERN = '[0-9a-zA-Z]|[0-9a-zA-Z_]{2,38}';
+ const USERNAME_PATTERN = '[0-9a-zA-Z_]{2,38}|[0-9a-zA-Z]';
public static function checkUsername($username) {
return preg_match('/^' . self::USERNAME_PATTERN . '$/', $username) === 1;