Changeset 18152


Ignore:
Timestamp:
Sep 22, 2012, 4:31:50 PM (12 years ago)
Author:
Eric
Message:

Bug 2749 fixed - regex meta-characters are usable in character exclusion in usernames
Next version will be 2.40.6

Location:
extensions/UserAdvManager/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/changelog.txt.php

    r18049 r18152  
    340340            Update it_IT, thanks to : Ericnet and virgigiole
    341341
    342 -- 2.41.0 : Bug 2744 fixed - User connexion rejection does not work if no group/status/privacy is set
     342-- 2.40.6 : Bug 2744 fixed - User connexion rejection does not work if no group/status/privacy is set
     343                                                      Bug 2749 fixed - regex meta-characters are usable in character exclusion in usernames
    343344            New unvalidated user controls more efficient
    344345            Get admins emails instead of webmaster's for sending validation email
  • extensions/UserAdvManager/trunk/include/functions.inc.php

    r18125 r18152  
    23672367    for ($i = 0 ; $i < count($conf_CharExclusion) ; $i++)
    23682368    {
    2369       $pattern = '/'.$conf_CharExclusion[$i].'/i';
     2369         //Detect meta-characters (# ! ^ $ ( ) [ ] { } ? + * . \ -) for special pattern
     2370         if ($conf_CharExclusion[$i] == "#"
     2371                                                        or $conf_CharExclusion[$i] == "$"
     2372                                                        or $conf_CharExclusion[$i] == "!"
     2373                                                        or $conf_CharExclusion[$i] == "^"
     2374                                                 or $conf_CharExclusion[$i] == "*"
     2375                                                        or $conf_CharExclusion[$i] == "?"
     2376                                                        or $conf_CharExclusion[$i] == "+"
     2377                                                        or $conf_CharExclusion[$i] == "."
     2378                                                        or $conf_CharExclusion[$i] == "\\"
     2379                                                        or $conf_CharExclusion[$i] == "|"
     2380                                                        or $conf_CharExclusion[$i] == "["
     2381                                                        or $conf_CharExclusion[$i] == "]"
     2382                                                        or $conf_CharExclusion[$i] == "("
     2383                                                        or $conf_CharExclusion[$i] == ")"
     2384                                                        or $conf_CharExclusion[$i] == "{"
     2385                                                        or $conf_CharExclusion[$i] == "}"
     2386                                                        or $conf_CharExclusion[$i] == "-")
     2387         {
     2388                 $pattern = '/[][^$.\*+?(){}#|-]/i';
     2389         }
     2390         else
     2391                                                {
     2392                                                                $pattern = '/'.$conf_CharExclusion[$i].'/i';
     2393                                                }
     2394
    23702395      if (preg_match($pattern, $login))
    23712396      {
Note: See TracChangeset for help on using the changeset viewer.