For all strings in regexps:
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 5 Feb 2001 21:13:53 +0000 (21:13 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 5 Feb 2001 21:13:53 +0000 (21:13 +0000)
 * PHP first unescapes the string
 * PHP sends string to ereg, ereg_replace, or whatever
 * ereg/ereg_replace/whatever unescapes the string to make the regexp

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1057 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/addressbook.php

index 4d043555c60da5d4f5afc1f95ce4f32f112871a6..fe2796fd6ebadb2c235f8e4b9da76bc84496b5e8 100644 (file)
            $userdata['nickname'] = $userdata['email'];
         }
 
-        if(eregi('[ \:\|\#\"\!]', $userdata['nickname'])) {
+        if(eregi('[ \\:\\|\\#\\"\\!]', $userdata['nickname'])) {
            $this->error = _("Nickname contain illegal characters");
            return false;
         }