Bug 399842 - URL with password containing "?" gets wrongly converted to http://
Summary: URL with password containing "?" gets wrongly converted to http://
Status: RESOLVED UPSTREAM
Alias: None
Product: dolphin
Classification: Applications
Component: bars: location (other bugs)
Version First Reported In: 17.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-15 15:51 UTC by Marc González Majoral
Modified: 2018-12-05 12:39 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc González Majoral 2018-10-15 15:51:12 UTC
SUMMARY
When you try to connect to any service with a URL including a password, if the password contains a question mark (?) the entire URL gets wrongly converted to the http protocol for some reason, even if it's already an http:// one.
If you try to escape the question mark a-la urlencode(), the connection works but then it sends the wrong password, because it's not decoded. So currently it's not possible to connect to any service using an URL with a password containing a question mark.

STEPS TO REPRODUCE
1. Try to connect to "ftp://test:pass?word@example.com"

OBSERVED RESULT
The URL gets converted to "http://ftp/test:pass/?word@example.com" for some reason and then Dolphin tries to open your web browser.

EXPECTED RESULT
An ftp connection is attempted with the correct password (including the "?").

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.12.7
KDE Frameworks Version: 5.47.0
Qt Version: 5.9.5
Comment 1 Thomas Surrel 2018-10-16 10:10:00 UTC
The problem is also present in Plasma 5.14, Application 18.08.02.
Comment 2 Thomas Surrel 2018-10-29 09:19:44 UTC
This is due to a Qt bug in QUrl::fromUserInput.
Right now, the Qt bug tracker does not let me search for existing bugs or create an account to report it. Anyone else can do that ?
Comment 3 Thomas Surrel 2018-12-05 12:39:27 UTC
Reported in https://bugreports.qt.io/browse/QTBUG-72319