Skip to content
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

Add Slack to the list of filtered web crawlers #5285

Merged
merged 3 commits into from
Apr 24, 2017

Conversation

rcscott
Copy link

@rcscott rcscott commented Apr 24, 2017

This adds Slack to the list of filtered web crawlers. Slack lists 3 different user agents for their crawlers and the Slack regex covers all 3 (https://api.slack.com/robots).

Filtering Twitter's crawler was suggested in #5284, but this should already be filtered by the generic bot[\/\s\)\;] regex. I added tests for this just to ensure that it is actually filtered.

Fixes #5284

@rcscott rcscott mentioned this pull request Apr 24, 2017
Copy link
Contributor

@mattrobenolt mattrobenolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a couple tests to cover these?

https://github.com/getsentry/sentry/blob/master/tests/sentry/filters/test_web_crawlers.py

I'd say since these are so easy to test, it'd be worth just piling a few in here.

Again, if not, I'd be happy to take over from here.

# Slack - see https://api.slack.com/robots
r'Slack',
# Twitter - see https://dev.twitter.com/cards/getting-started#crawling
r'Twitterbot',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it seems that this is already being covered by L30 above. No?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup I think you're right! I'll get rid of that.

@rcscott
Copy link
Author

rcscott commented Apr 24, 2017

@mattrobenolt got it, I'll throw some tests in there this afternoon.

@rcscott rcscott changed the title Add Slack and Twitter to the list of filtered web crawlers Add Slack to the list of filtered web crawlers Apr 24, 2017
@rcscott
Copy link
Author

rcscott commented Apr 24, 2017

@mattrobenolt I removed the Twitter filter and added unit tests. I figured I'd add tests for Twitter as well just to be sure.

Copy link
Contributor

@mattrobenolt mattrobenolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks. 🍦

@mattrobenolt mattrobenolt merged commit 3d3a81e into getsentry:master Apr 24, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter Slackbot crawler
2 participants