Univention Bugzilla – Bug 33443
401 status error is not correctly interpreted to open the login dialogue
Last modified: 2014-01-29 11:20:15 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.
Fixed in univention-updater 9.0.38-2.1236.201311211352 YAML created. No changelog, not built for next version
*** Bug 33581 has been marked as a duplicate of this bug. ***
The issue from Bug #33610 should be fixed with this bug.
(In reply to Stefan Gohmann from comment #3) > The issue from Bug #33610 should be fixed with this bug. Okay. Fixing there
(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.
(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
OK, login dialog is displayed.
http://errata.univention.de/ucs/3.2/39.html