Bug 460944 - KIO::MimeTypeFinderJob doesn't display authentication dialog
Summary: KIO::MimeTypeFinderJob doesn't display authentication dialog
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.99.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 477352 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-10-24 14:24 UTC by Stefano Crocco
Modified: 2024-03-29 13:32 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Crocco 2022-10-24 14:24:06 UTC
When using KIO::MimeTypeFinderJob to determine the mimetype of a ftp URL requiring authentication (I don't know whether the same happens with other schemes) it doesn't display an authentication dialog, even if setAuthenticationPromptEnabled(true) has been called. Instead, the job always returns an error with error code of 1 and error string of "User canceled action".

Removing line 131 in mimetypefinderjob.cpp allows the dialog to be displayed.
Comment 1 Nicolas Fella 2022-10-24 15:43:33 UTC
> Removing line 131 in mimetypefinderjob.cpp allows the dialog to be displayed.

That makes a lot of sense. I wonder though why that was added in the first place
Comment 2 Stefano Crocco 2024-02-18 17:43:10 UTC
*** Bug 477352 has been marked as a duplicate of this bug. ***
Comment 3 Raphael Rosch 2024-02-19 02:51:44 UTC
I would also add that it would be great for sftp connection credentials to be re-used. When I restore a crashed session, I get a series of sftp authentication prompts for the same domain.. one for each window/view for the same sftp connection. If I don't type it in quickly enough, then the connection fails, and I am unable to connect to the server, even after a refresh of the view contents. I noticed recently that after a few days /some/ of the connections allow for another attempt to provide credential details.
Comment 4 Bug Janitor Service 2024-03-10 18:07:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1572
Comment 5 Stefano Crocco 2024-03-29 13:32:53 UTC
Git commit 682b09c21553cd47230fb2c948a944a47ab0252e by Stefano Crocco.
Committed on 29/03/2024 at 13:32.
Pushed by stefanocrocco into branch 'master'.

Fix authentication prompt not being shown

Calling job->setUiDelegate(nullptr) prevents the authentication prompt from being displayed, even if it's been enabled

M  +0    -2    src/core/mimetypefinderjob.cpp

https://invent.kde.org/frameworks/kio/-/commit/682b09c21553cd47230fb2c948a944a47ab0252e