-
Notifications
You must be signed in to change notification settings - Fork 121
Add lightpanda to webcrawlers filter. #6143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,7 @@ static WEB_CRAWLERS: LazyLock<Regex> = LazyLock::new(|| { | |
| PerplexityBot| # Perplexity - see https://docs.perplexity.ai/guides/bots | ||
| Applebot| # Apple - see https://support.apple.com/en-us/119829 | ||
| DuckDuckBot # DuckDuckGo - see https://duckduckgo.com/duckduckgo-help-pages/results/duckduckbot | ||
| Lightpanda # Lightpand - see https://lightpanda.io/ | ||
|
Comment on lines
48
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The missing pipe Suggested FixAdd a pipe separator ( Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
| " | ||
| ) | ||
| .expect("Invalid web crawlers filter Regex") | ||
|
|
@@ -164,6 +165,7 @@ mod tests { | |
| "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)", | ||
| "Mozilla/5.0 (Device; OS_version) AppleWebKit/WebKit_version (KHTML, like Gecko)Version/Safari_version [Mobile/Mobile_version] Safari/WebKit_version (Applebot/Applebot_version; +http://www.apple.com/go/applebot)", | ||
| "DuckDuckBot/1.1; (+http://duckduckgo.com/duckduckbot.html)", | ||
| "Lightpanda/1.0", | ||
| ]; | ||
|
|
||
| for banned_user_agent in &user_agents { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing regex alternation pipe
High Severity
The
WEB_CRAWLERSpattern uses(?x), soDuckDuckBotand the newLightpandatoken are concatenated into one literalDuckDuckBotLightpandabecause there is no|between them. RealDuckDuckBotandLightpandauser agents no longer match their intended alternatives.Reviewed by Cursor Bugbot for commit 2e32395. Configure here.