From 3bc78d24735aa03cf643395cfaf2f341cf988097 Mon Sep 17 00:00:00 2001 From: Zixuan James Li Date: Thu, 14 Jul 2022 11:54:47 -0400 Subject: [PATCH] decorator: Do not set remote_server.rate_limits. In https://github.com/zulip/zulip/commit/b46af40bd385f13e3731987832f5dd0eda649206, we set this attribute because back then we might call `rate_limit_user` on `RemoteZulipServer`. This is no longer the case as `RemoteZulipServer` now has its own rate limiting and we never call `rate_limit_user` without an `isinstance` check for `UserProfile`. Signed-off-by: Zixuan James Li --- zerver/decorator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/zerver/decorator.py b/zerver/decorator.py index 9c1f8ac952..a0886aa4cf 100644 --- a/zerver/decorator.py +++ b/zerver/decorator.py @@ -264,7 +264,6 @@ def validate_api_key( if get_subdomain(request) != Realm.SUBDOMAIN_FOR_ROOT_DOMAIN: raise JsonableError(_("Invalid subdomain for push notifications bouncer")) request.user = remote_server - remote_server.rate_limits = "" # Skip updating UserActivity, since remote_server isn't actually a UserProfile object. process_client(request) return remote_server