]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1197061 - don't create a new session for every authenticated XMLRPC/JSONRPC call
authorDavid Lawrence <dkl@mozilla.com>
Mon, 4 Apr 2016 16:37:25 +0000 (16:37 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Mon, 4 Apr 2016 16:37:25 +0000 (16:37 +0000)
Bugzilla/WebService/Server.pm

index d1e17a950e34f5bf472b145caee0fddb56d48f0e..a84ba29617841854fa4fc79fc6768a4be764edfc 100644 (file)
@@ -35,6 +35,13 @@ sub handle_login {
         Bugzilla->metrics->name("$class $method");
     }
 
+    # We never want to create a new session unless the user is calling the
+    # login method.  Setting dont_persist_session makes
+    # Bugzilla::Auth::_handle_login_result() skip calling persist_login().
+    if ($full_method ne 'User.login') {
+        Bugzilla->request_cache->{dont_persist_session} = 1;
+    }
+
     eval "require $class";
     ThrowCodeError('unknown_method', {method => $full_method}) if $@;
     return if ($class->login_exempt($method)