Closed
Bug 1038741
Opened 12 years ago
Closed 12 years ago
If Bugzilla is used as authentication method and the XMLRPC endpoint is incorrect, reviewboard crashes and you are unable to login as admin and correct
Categories
(MozReview Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dkl, Unassigned)
Details
Attachments
(1 file)
If you incorrectly enter the XMLRPC endpoint URL in the configuration for the Bugzilla auth method, it will generate a fatal error when trying to login as any user, even as admin. This will block being able to get back in to correct the URL error. I was able to get back in by editing the JSON blob in siteconfig_siteconfiguration in the DB :(
[Tue Jul 15 15:00:01 2014] [error] ERROR:root:Exception thrown for user AnonymousUser at http://localhost/account/login/
[Tue Jul 15 15:00:01 2014] [error]
[Tue Jul 15 15:00:01 2014] [error] <ProtocolError for bugzilla-dev.allizom.org/RPC2: 404 Not Found>
[Tue Jul 15 15:00:01 2014] [error] Traceback (most recent call last):
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/core/handlers/base.py", line 112, in get_response
[Tue Jul 15 15:00:01 2014] [error] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/views/decorators/debug.py", line 75, in sensitive_post_parameters_wrapper
[Tue Jul 15 15:00:01 2014] [error] return view(request, *args, **kwargs)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/utils/decorators.py", line 99, in _wrapped_view
[Tue Jul 15 15:00:01 2014] [error] response = view_func(request, *args, **kwargs)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/views/decorators/cache.py", line 52, in _wrapped_view_func
[Tue Jul 15 15:00:01 2014] [error] response = view_func(request, *args, **kwargs)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/contrib/auth/views.py", line 36, in login
[Tue Jul 15 15:00:01 2014] [error] if form.is_valid():
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/forms/forms.py", line 129, in is_valid
[Tue Jul 15 15:00:01 2014] [error] return self.is_bound and not bool(self.errors)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/forms/forms.py", line 121, in errors
[Tue Jul 15 15:00:01 2014] [error] self.full_clean()
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/forms/forms.py", line 274, in full_clean
[Tue Jul 15 15:00:01 2014] [error] self._clean_form()
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/forms/forms.py", line 300, in _clean_form
[Tue Jul 15 15:00:01 2014] [error] self.cleaned_data = self.clean()
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/contrib/auth/forms.py", line 189, in clean
[Tue Jul 15 15:00:01 2014] [error] password=password)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/contrib/auth/__init__.py", line 49, in authenticate
[Tue Jul 15 15:00:01 2014] [error] user = backend.authenticate(**credentials)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/rbbz-0.1.16-py2.6.egg/rbbz/auth.py", line 42, in authenticate
[Tue Jul 15 15:00:01 2014] [error] user_data = bugzilla.log_in(username, password, cookie)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/rbbz-0.1.16-py2.6.egg/rbbz/bugzilla.py", line 18, in _transform_errors
[Tue Jul 15 15:00:01 2014] [error] return func(*args, **kwargs)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/rbbz-0.1.16-py2.6.egg/rbbz/bugzilla.py", line 67, in log_in
[Tue Jul 15 15:00:01 2014] [error] 'password': password})
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
[Tue Jul 15 15:00:01 2014] [error] return self.__send(self.__name, args)
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
[Tue Jul 15 15:00:01 2014] [error] verbose=self.__verbose
[Tue Jul 15 15:00:01 2014] [error] File "/usr/lib/python2.6/site-packages/rbbz-0.1.16-py2.6.egg/rbbz/transports.py", line 72, in request
[Tue Jul 15 15:00:01 2014] [error] response.msg.headers)
[Tue Jul 15 15:00:01 2014] [error] ProtocolError: <ProtocolError for bugzilla-dev.allizom.org/RPC2:
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mcote
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•12 years ago
|
||
/r/70 - Bug 1038741 - Handle XMLRPC ProtocolErrors.
Attachment #8456263 -
Flags: review?(dkl)
| Reporter | ||
Comment 2•12 years ago
|
||
Still generates fatal error to error_log when not properly formed bugzolla XMLRPC URL giving internal server 500 error:
[Wed Jul 16 15:15:22 2014] [error] not well-formed (invalid token): line 25, column 181
[Wed Jul 16 15:15:22 2014] [error] Traceback (most recent call last):
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/core/handlers/base.py", line 112, in get_response
[Wed Jul 16 15:15:22 2014] [error] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/views/decorators/debug.py", line 75, in sensitive_post_parameters_wrapper
[Wed Jul 16 15:15:22 2014] [error] return view(request, *args, **kwargs)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/utils/decorators.py", line 99, in _wrapped_view
[Wed Jul 16 15:15:22 2014] [error] response = view_func(request, *args, **kwargs)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/views/decorators/cache.py", line 52, in _wrapped_view_func
[Wed Jul 16 15:15:22 2014] [error] response = view_func(request, *args, **kwargs)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/contrib/auth/views.py", line 36, in login
[Wed Jul 16 15:15:22 2014] [error] if form.is_valid():
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/forms/forms.py", line 129, in is_valid
[Wed Jul 16 15:15:22 2014] [error] return self.is_bound and not bool(self.errors)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/forms/forms.py", line 121, in errors
[Wed Jul 16 15:15:22 2014] [error] self.full_clean()
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/forms/forms.py", line 274, in full_clean
[Wed Jul 16 15:15:22 2014] [error] self._clean_form()
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/forms/forms.py", line 300, in _clean_form
[Wed Jul 16 15:15:22 2014] [error] self.cleaned_data = self.clean()
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/contrib/auth/forms.py", line 189, in clean
[Wed Jul 16 15:15:22 2014] [error] password=password)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.5-py2.6.egg/django/contrib/auth/__init__.py", line 49, in authenticate
[Wed Jul 16 15:15:22 2014] [error] user = backend.authenticate(**credentials)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/rbbz-0.1.16-py2.6.egg/rbbz/auth.py", line 42, in authenticate
[Wed Jul 16 15:15:22 2014] [error] user_data = bugzilla.log_in(username, password, cookie)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/rbbz-0.1.16-py2.6.egg/rbbz/bugzilla.py", line 18, in _transform_errors
[Wed Jul 16 15:15:22 2014] [error] return func(*args, **kwargs)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/rbbz-0.1.16-py2.6.egg/rbbz/bugzilla.py", line 67, in log_in
[Wed Jul 16 15:15:22 2014] [error] 'password': password})
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
[Wed Jul 16 15:15:22 2014] [error] return self.__send(self.__name, args)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
[Wed Jul 16 15:15:22 2014] [error] verbose=self.__verbose
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib/python2.6/site-packages/rbbz-0.1.16-py2.6.egg/rbbz/transports.py", line 76, in request
[Wed Jul 16 15:15:22 2014] [error] parser.feed(payload)
[Wed Jul 16 15:15:22 2014] [error] File "/usr/lib64/python2.6/xmlrpclib.py", line 601, in feed
[Wed Jul 16 15:15:22 2014] [error] self._parser.Parse(data, 0)
[Wed Jul 16 15:15:22 2014] [error] ExpatError: not well-formed (invalid token): line 25, column 181
| Reporter | ||
Comment 3•12 years ago
|
||
Comment on attachment 8456263 [details]
Review for review ID: bz://1038741
r- based on comment 2
Attachment #8456263 -
Flags: review?(dkl) → review-
| Assignee | ||
Comment 4•12 years ago
|
||
I cannot repro this specific exception, although I did get an IOError, which I am adjusting my patch to take care of. Exactly what did you do/configure to get this exact exception?
| Reporter | ||
Comment 5•12 years ago
|
||
I have been able to get this patch to work this time. I had to clear out my old cookies from previous sessions and that allowed me to login using the Admin account. Then I was able correct the URL and
all worked properly. Also with the patch applied, I no longer got the 500 error and got a normal username or password incorrect error in the UI.
The error_log output:
[Thu Jul 17 18:17:34 2014] [error] ProtocolError: <ProtocolError for bugzilla-dev.allizom.org/RPC2: 404 Not Found>
r=dkl
| Reporter | ||
Updated•12 years ago
|
Attachment #8456263 -
Flags: review+
| Reporter | ||
Updated•12 years ago
|
Attachment #8456263 -
Flags: review-
| Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 8456263 [details]
Review for review ID: bz://1038741
/r/70 - Bug 1038741 - Handle XMLRPC ProtocolErrors.
Attachment #8456263 -
Flags: review+ → review?(dkl)
| Reporter | ||
Comment 7•12 years ago
|
||
Works. r=dkl
| Reporter | ||
Updated•12 years ago
|
Attachment #8456263 -
Flags: review?(dkl) → review+
| Assignee | ||
Comment 8•12 years ago
|
||
http://hg.mozilla.org/hgcustom/version-control-tools/rev/1740158f2d5e (with small changing to vertical whitespace as per Review Board code style)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: bugzilla.mozilla.org → Developer Services
Updated•10 years ago
|
Product: Developer Services → MozReview
You need to log in
before you can comment on or make changes to this bug.
Description
•