Skip to content

Commit

Permalink
Fix settings.RATE_LIMITING=False for webhooks.
Browse files Browse the repository at this point in the history
We were incorrectly applying the rate limiting rules to webhooks even
if rate limiting was disabled (as in the test suite), causing test
failures when the total number of webhook tests in Zulip got too high.
  • Loading branch information
timabbott committed Apr 27, 2016
1 parent b4555e5 commit e6cfd91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zerver/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ def _wrapped_view_func(request, api_key=REQ,
request.user = user_profile
request._email = user_profile.email
process_client(request, user_profile)
rate_limit_user(request, user_profile, domain='all')
if settings.RATE_LIMITING:
rate_limit_user(request, user_profile, domain='all')
return view_func(request, user_profile, *args, **kwargs)
return _wrapped_view_func

Expand Down

0 comments on commit e6cfd91

Please sign in to comment.