LJSUP-17729: [xml-rpc] Enable common rate limit system for XML-RPC API
authorklosev <klosev@1dfba125-df10-0410-8a77-af1a8d6d074f>
Mon, 31 Mar 2014 12:30:45 +0000 (31 12:30 +0000)
committerklosev <klosev@1dfba125-df10-0410-8a77-af1a8d6d074f>
Mon, 31 Mar 2014 12:30:45 +0000 (31 12:30 +0000)
git-svn-id: http://code.livejournal.org/svn/livejournal/trunk@25591 1dfba125-df10-0410-8a77-af1a8d6d074f

cgi-bin/ljprotocol.pl

index 64ed90b..fce091c 100644 (file)
@@ -283,9 +283,8 @@ sub do_request
     my ($method, $req, $err, $flags) = @_;
 
     # xmlrpc rate limit
-    my @limited_methods = qw(getevents);
     if (
-        ( grep { $method eq $_ } @limited_methods )        # Only for specified methods.
+        ( grep { $method eq $_ } @LJ::API_RATE_LIMIT_LIMITED_METHODS ) # Only for specified methods.
         && !$flags->{noauth}                               # Only for external calls.
         && ( $req->{'props'}->{'interface'} eq 'xml-rpc' ) # Only for xml-rpc calls.
         && LJ::Request->is_inited()                        # Only in web context.