Re: REST-API: Merging/Rebasing with Mercurial?
"John P. Rouillard" <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Ralf: In message <[email protected]>, "John P. Rouillard" writes: > >Using curl: > >$ curl -u admin -p https://uland/sysadmin/rest/data/issue/1 [...] >if I intentionally mistype the password, I get: >==== >EXCEPTION AT Thu Jan 31 01:22:24 2019 >Traceback (most recent call last): > File "roundup/scripts/roundup_server.py", line 222, in run_cgi > tracker.Client(tracker, self, env).main() > File "/home/rouilj/develop/roundup.sysadmin/roundup/cgi/client.py", line 436, in main > self.handle_rest() > File "/home/rouilj/develop/roundup.sysadmin/roundup/cgi/client.py", line 499, in handle_rest > self.determine_user() > File "/home/rouilj/develop/roundup.sysadmin/roundup/cgi/client.py", line 892, in determine_user > login.verifyLogin(username, password) > File "/home/rouilj/develop/roundup.sysadmin/roundup/cgi/actions.py", line 1270, in verifyLogin > raise exceptions.LoginError(self._('Invalid login')) >LoginError: Invalid login ><body bgcolor="white"><font color="white" size="-5"> > </font> </table></table></table></table></table><p>Thu Jan 31 01:22:24 2019: An error occurred. Please check > the server log for more information.</p> >==== > >This is with [web] debug turned off in config.ini. Maybe a missing try >somewhere? I forgot that I was tailing the log file in the window I was using to test. The actual output is just: ==== <body bgcolor="white"><font color="white" size="-5"> > </font> </table></table></table></table></table><p>Thu Jan 31 02:49:24 2019: An error occurred. Please check the server log for more information.</p> ==== with a 400 status code returned from the server. I think in this case a 401 code should returned. https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_errors says: 401 Unauthorized (RFC 7235) Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided a bad password is a failed authentication. In testing I am running roundup as its own server with a web server proxy in front of it. Have a great week. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions.