瀏覽代碼

For all strings in regexps:
* 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

Tyler Akins 24 年之前
父節點
當前提交
e566fef3ee
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      functions/addressbook.php

+ 1 - 1
functions/addressbook.php

@@ -280,7 +280,7 @@
 	    $userdata['nickname'] = $userdata['email'];
 	    $userdata['nickname'] = $userdata['email'];
 	 }
 	 }
 
 
-	 if(eregi('[ \:\|\#\"\!]', $userdata['nickname'])) {
+	 if(eregi('[ \\:\\|\\#\\"\\!]', $userdata['nickname'])) {
 	    $this->error = _("Nickname contain illegal characters");
 	    $this->error = _("Nickname contain illegal characters");
 	    return false;
 	    return false;
 	 }
 	 }