diff options
author | David Lawrence <dkl@mozilla.com> | 2016-04-04 18:37:25 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2016-04-04 18:37:25 +0200 |
commit | c83c4f78bb91c27e2ffd0e5fb8091fe6795885b8 (patch) | |
tree | 838f9ffcf1a464d52aa1695a24476abf7acdca3e /Bugzilla/WebService | |
parent | ef9e420355b92187f0c8207dff439f93c3deb4bc (diff) | |
download | bugzilla-c83c4f78bb91c27e2ffd0e5fb8091fe6795885b8.tar.gz bugzilla-c83c4f78bb91c27e2ffd0e5fb8091fe6795885b8.tar.xz |
Bug 1197061 - don't create a new session for every authenticated XMLRPC/JSONRPC call
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r-- | Bugzilla/WebService/Server.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server.pm b/Bugzilla/WebService/Server.pm index d1e17a950..a84ba2961 100644 --- a/Bugzilla/WebService/Server.pm +++ b/Bugzilla/WebService/Server.pm @@ -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) |