mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Improve regex for robot detection
- User-Agent에 URL이 들어갈 때는 괄호에 넣거나 +를 붙이도록 되어 있음 - 워드프레스 핑백 공격도 로봇으로 취급
This commit is contained in:
parent
ca90ac2c8e
commit
b6557622d2
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ class UA
|
|||
}
|
||||
|
||||
// Look for common search engine names and the 'bot' keyword.
|
||||
if (preg_match('/bot|spider|crawler|archiver|wget|curl|php|slurp|facebook|teoma|yeti|daum|https?:|@/i', $ua))
|
||||
if (preg_match('/bot|spider|crawler|archiver|wget|curl|php|slurp|wordpress|facebook|teoma|yeti|daum|[(<+]https?:|@/i', $ua))
|
||||
{
|
||||
return self::$_robot_cache[$ua] = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue