diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-03-23 16:08:48 -0700 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-03-23 16:08:48 -0700 |
commit | ccb36aaa7adc9d07d74dd5c2e64763cc8749cf4c (patch) | |
tree | ea393c1908bee42b801e1a4cbd7df7ea64ee7263 /Bugzilla/Auth | |
parent | 9e572adb765cfb7d814b38ba1bf7f23c9ac47980 (diff) | |
download | bugs-ccb36aaa7adc9d07d74dd5c2e64763cc8749cf4c.tar bugs-ccb36aaa7adc9d07d74dd5c2e64763cc8749cf4c.tar.gz bugs-ccb36aaa7adc9d07d74dd5c2e64763cc8749cf4c.tar.bz2 bugs-ccb36aaa7adc9d07d74dd5c2e64763cc8749cf4c.tar.xz bugs-ccb36aaa7adc9d07d74dd5c2e64763cc8749cf4c.zip |
Bug 553770: Make the JSON-RPC WebService throw a proper error when you don't
provide login credentials on a LOGIN_REQUIRED page. (Before this, it was
attempting to display the HTML login page to JSON-RPC clients.)
r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/Auth')
-rw-r--r-- | Bugzilla/Auth/Login/CGI.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Bugzilla/Auth/Login/CGI.pm b/Bugzilla/Auth/Login/CGI.pm index 407582af4..8e877b951 100644 --- a/Bugzilla/Auth/Login/CGI.pm +++ b/Bugzilla/Auth/Login/CGI.pm @@ -57,10 +57,8 @@ sub fail_nodata { my $cgi = Bugzilla->cgi; my $template = Bugzilla->template; - if (Bugzilla->error_mode == Bugzilla::Constants::ERROR_MODE_DIE_SOAP_FAULT) { - die SOAP::Fault - ->faultcode(ERROR_AUTH_NODATA) - ->faultstring('Login Required'); + if (Bugzilla->usage_mode != USAGE_MODE_BROWSER) { + ThrowUserError('login_required'); } print $cgi->header(); |