-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Unable to login to PrusaLink on Safari (macOS/iOS/iPadOS ) #3287
Comments
Good find. Hopefully a fix is soon in the main release. |
Just finished my MK4 kit build, loaded firmware 5.0.0, setup wifi, but I can't login with any browser. I just keep getting the login window over any over again. |
I've seen many reports of people unable to use any Safari-based browser, but they were all able to login with Chrome or Firefox (on desktop that is, not on iOS). |
For some reason, generating a new password made everything work. Don't know what it had against the original one, I checked it about a dozen times. |
Thank you very much for the suggestion. I'll make sure the developers will acknowledge this thread. I wonder if this can be escalated as a Pull Request or if it can be closed as a duplicate of #3043 and prusa3d/Prusa-Link-Web#386. Michele Moramarco |
The initial valid period for the HTTP Digest Auth nonce was too low (at 5 seconds). This make it impossible to log into PrusaLink when using Safari, a saner value of 300 (chosen because it's Apache's default value) does not hinder security and fixes the issue with Safari-based browsers (macOS, ipadOS, iOS). See prusa3d#3287 for more details.
Thank you for your reply, #3043 is definitely the same issue as this one (sorry I should have commented on it instead of opening this issue). I've gone ahead and opened a PR: https://github.com/prusa3d/Prusa-Firmware-Buddy/pull/3371/files with the fix. Please don't hesitate to close this, #3043 and prusa3d/Prusa-Link-Web#386 if you think it's best. |
Just managed to replicate this on safari for mobile. Waited more than 5s and as usual credentials prompt just reappeared. Copied my password for next attempt, for less than 5s, pasted and logged in no problem |
Just upgraded to v5.0.1 (Mk4), seem to have the same issue in Windows
UPDATE |
I've run into the same problem. I can't consistently log in using Safari, which I was able to do before I upgraded the firmware. Upvote for this fix. |
@GRIFFCOMMca I'm not sure if this issue affects Windows and Chrome as they are the most popular combination but I don't seem to see similar reports. Also, this issue is quite specific about Safari (macOS/iOS/iPadOS). @pyrho Thanks for your commitment and for opening the Pull Request. This issue will be closed because opened after issue #3043. Michele Moramarco |
The initial valid period for the HTTP Digest Auth nonce was too low (at 5 seconds). This make it impossible to log into PrusaLink when using Safari, a saner value of 300 (chosen because it's Apache's default value) does not hinder security and fixes the issue with Safari-based browsers (macOS, ipadOS, iOS). See prusa3d#3287 for more details.
The initial valid period for the HTTP Digest Auth nonce was too low (at 5 seconds). This make it impossible to log into PrusaLink when using Safari, a saner value of 300 (chosen because it's Apache's default value) does not hinder security and fixes the issue with Safari-based browsers (macOS, ipadOS, iOS). See #3287 for more details.
The initial valid period for the HTTP Digest Auth nonce was too low (at 5 seconds). This make it impossible to log into PrusaLink when using Safari, a saner value of 300 (chosen because it's Apache's default value) does not hinder security and fixes the issue with Safari-based browsers (macOS, ipadOS, iOS). See prusa3d#3287 for more details.
The initial valid period for the HTTP Digest Auth nonce was too low (at 5 seconds). This make it impossible to log into PrusaLink when using Safari, a saner value of 300 (chosen because it's Apache's default value) does not hinder security and fixes the issue with Safari-based browsers (macOS, ipadOS, iOS). See prusa3d#3287 for more details.
opened a new issue, because it's not related to Safari and only happens on opening the API-Sites, but I think it's related to this bug: #507 |
Please, before you create a new bug report, please make sure you searched in open and closed issues and couldn't find anything that matches.
Printer type - [ALL]
Printer firmware version - [>= 5.0.0]
Original or Custom firmware - [Original]
Optional upgrades - [N/A]
USB drive or USB/Octoprint - USB drive
Describe the bug
The
nonce
generated by the backend for HTTP Digest authentication (used by PrusaLink) is only valid for 5 seconds (as defined in the code here).Safari (contrary to the other browsers it seems) does not re-submit the credentials with a fresh nonce upon receiving a 401 response code. So each time Safari displays its Digest Auth modal window, you only have 5 seconds to provide valid credentials, after which the
nonce
will become stale and any login attempt will fail.This seems to be specific to Safari, as it would seem like the other browsers work around this by re-submitting the authentication request when the
nonce
is stale (using the freshly provided one).Short of submitting a feature request to Safari, our only hope (assuming we're sticking with Digest Auth), is to increase the
nonce
's lifetime to something more sensible. jvasileff mentioned in prusa3d/Prusa-Link-Web#386 that Apache's defaultnonce
lifetime is 300. This document also states the following:This timeout is too short, especially on iOS where typing is slower than on a desktop, making it impossible to login in the 5 second time frame allowed.
How to reproduce
Try to connect to PrusaLink (FW >= 5.0.0) using Safari (iOS, macOS, or iPadOS), take more than 5 seconds to enter your login and password when prompted; the login attempt will fail.
Expected behavior
Users are able to log into PrusaLink using the Safari web browser.
How to fix
Patch provided by jvasileff in prusa3d/Prusa-Link-Web#386 (comment)
G-code
N/A
Crash dump file
N/A
Video
Typing the credentials after 5 seconds demo (fail):
Typing the credentials within 5 seconds demo (success):
The text was updated successfully, but these errors were encountered: