Bug 33443 - 401 status error is not correctly interpreted to open the login dialogue
401 status error is not correctly interpreted to open the login dialogue
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Software update
UCS 3.2
Other Linux
: P1 normal (vote)
: UCS 3.2-0-errata
Assigned To: Dirk Wiesenthal
Florian Best
:
: 33581 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-18 09:21 CET by Alexander Kläser
Modified: 2014-01-29 11:20 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2013-11-18 09:21:13 CET
Currently, the updater module does not handle 401 (=unauthorized) errors correctly, therefore the login dialogue is not opened if the UMC server is restarted in the update process.

The problem is in the method umc/modules/updater:handleQueryError(). The handling is not correct:

> handleQueryError: function(subject, data) {
>     ...
>     if (data.status == 401) { ... }
>     ...
> }

At this point "data" has the following structure:

> {
>   "stack": "...",
>   "message": "Unable to load /umcp/command/updater/installer/status status: 401",
>   "response": {
>     "url": "/umcp/command/updater/installer/status",
>     "options": {
>       "method": "POST",
>       "data": "{\"options\":{\"job\":\"distupgrade\"}}",
>       "handleAs": "json",
>       "headers": {
>         "Content-Type": "application/json"
>       }
>     },
>     "xhr": {
>       "statusText": "Unauthorized",
>       "status": 401,
>       "response": "{\"status\": 401, \"message\": \"None\"}",
>       "responseType": "",
>       "responseXML": null,
>       "responseText": "{\"status\": 401, \"message\": \"None\"}",
>       "upload": {
>         "onprogress": null,
>         "onloadstart": null,
>         "onloadend": null,
>         "onload": null,
>         "onerror": null,
>         "onabort": null
>       },
>       "withCredentials": false,
>       "readyState": 4,
>       "timeout": 0,
>       "onreadystatechange": null,
>       "ontimeout": null,
>       "onprogress": null,
>       "onloadstart": null,
>       "onloadend": null,
>       "onload": null,
>       "onerror": null,
>       "onabort": null
>     },
>     "loaded": 34,
>     "total": 34,
>     "status": 401,
>     "text": "{\"status\": 401, \"message\": \"None\"}",
>     "data": {
>       "status": 401,
>       "message": "None"
>     }
>   }
> }

Correct would be data.response.status == 401. However, even more correct would be to use the UMC wide error handling.
Comment 1 Dirk Wiesenthal univentionstaff 2013-11-21 15:45:05 CET
Fixed in
  univention-updater 9.0.38-2.1236.201311211352

YAML created.

No changelog, not built for next version
Comment 2 Stefan Gohmann univentionstaff 2013-12-17 06:45:49 CET
*** Bug 33581 has been marked as a duplicate of this bug. ***
Comment 3 Stefan Gohmann univentionstaff 2013-12-17 06:46:50 CET
The issue from Bug #33610 should be fixed with this bug.
Comment 4 Dirk Wiesenthal univentionstaff 2014-01-09 17:36:47 CET
(In reply to Stefan Gohmann from comment #3)
> The issue from Bug #33610 should be fixed with this bug.

Okay. Fixing there
Comment 5 Stefan Gohmann univentionstaff 2014-01-10 06:07:02 CET
(In reply to Stefan Gohmann from comment #3)
> The issue from Bug #33610 should be fixed with this bug.

Sorry, but I think I meant Bug #33581, which I solved as duplicate of this bug. Bug #33610 has nothing to do with this bug.
Comment 6 Dirk Wiesenthal univentionstaff 2014-01-10 11:24:50 CET
(In reply to Stefan Gohmann from comment #5)
> I meant Bug #33581, which I solved as duplicate of this
> bug

Fixed in
  univention-updater 9.0.38-9.1244.201401101117
Comment 7 Florian Best univentionstaff 2014-01-14 13:34:27 CET
OK, login dialog is displayed.
Comment 8 Moritz Muehlenhoff univentionstaff 2014-01-29 11:20:15 CET
http://errata.univention.de/ucs/3.2/39.html