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

Wrong user-agent check in LAZYSIGNUP_USER_AGENT_BLACKLIST for Yandex #65

Open
LosYear opened this issue Aug 1, 2019 · 0 comments
Open

Comments

@LosYear
Copy link

LosYear commented Aug 1, 2019

django-lazysignup uses LAZYSIGNUP_USER_AGENT_BLACKLIST with default value:

DEFAULT_BLACKLIST = (
    'slurp',
    'googlebot',
    'yandex',
    'msnbot',
    'baiduspider',
)

and it works good with all search engines except Yandex. According to yandex documentation it has a lot of search bots and all of user-agents start with Yandex but this company also has own browser and search app. And on Android its user-agent looks like:

 'Mozilla/5.0 (Linux; Android 7.1.1; ONEPLUS A5000 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.110 Safari/537.36 YandexSearch/8.70/apad YandexSearchBrowser/8.70'

and contains the word Yandex. So its wrongly interpreted as search bot and the user doesn't get an authorization. I think you should replace yandex with yandexbot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant