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

Error 500 when /reviews/add/27/ or /select-variant is called by spammers #167

Open
jzuschlag opened this issue Jan 13, 2015 · 2 comments
Open

Comments

@jzuschlag
Copy link
Contributor

Since URLconf of django_reviews matches /reviews/add/27/ I don't have a good idea to omit this error. For /select-variant (and maybe others) there might be a solution. The problem is, the spammers are producing a lot of error mails. Any ideas?

@pigletto
Copy link
Collaborator

Same thing: diefenbach/django-reviews#1 ?

@jzuschlag
Copy link
Contributor Author

Well, same thing for /reviews/add/27/. But your patch doesn't work for me (0.7.7). The exception is not found:
"except ctype.model_class().DoesNotExist:"
Just a simple
"except:"
worked for me.

/select-variant is a different case. In lfs.select-variant
"variant = Product.objects.get(pk=variant_id)"
is called with variant_id=None and throws a DoesNotExist exception. Shall we just look for variant_id=None and through a 404?

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

2 participants