mirror of
https://github.com/typecho/typecho.git
synced 2025-04-21 18:21:53 +02:00
修正电子邮箱过滤不严可能造成的xss
This commit is contained in:
parent
90e2c08542
commit
f7cb1a1d49
@ -209,7 +209,7 @@ class Typecho_Validate
|
||||
*/
|
||||
public function email($str)
|
||||
{
|
||||
return preg_match("/^[^@\s<&>]+@([-a-z0-9]+\.)+[a-z]{2,}$/i", $str);
|
||||
return preg_match("/^[_a-z0-9-\.]+@([-a-z0-9]+\.)+[a-z]{2,}$/i", $str);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user