fix: preserve custom URI schemes in %U/%u Exec field expansion#373
fix: preserve custom URI schemes in %U/%u Exec field expansion#373lionheartyu wants to merge 1 commit into
Conversation
QUrl::fromUserInput() treats unrecognized schemes as HTTP hostnames, rewriting e.g. 'ksowpscloudsvr://start=RelayHttpServer' into 'http://ksowpscloudsvr//start=RelayHttpServer', which silently breaks any application registered as a custom protocol handler via x-scheme-handler MIME type (e.g. WPS Office OA integration). Root cause: commit 9dd7e7f ('fix: dde-open file failed') replaced QUrl{field} with QUrl::fromUserInput(field) to fix local file path handling (toLocalFile() returning empty for bare paths). However, fromUserInput's smart-guessing logic corrupts custom URI schemes by treating the scheme name as an HTTP hostname. Fix: detect fields that already carry a scheme ('://') and parse them directly with QUrl::TolerantMode, which accepts non-RFC-compliant host components such as 'start=RelayHttpServer'. Bare file paths (no '://') continue to use fromUserInput as before, preserving the original fix. Regressed-by: 9dd7e7f
There was a problem hiding this comment.
Sorry @lionheartyu, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
CLA Assistant Lite bot: You can retrigger this bot by commenting recheck in this Pull Request |
|
Hi @lionheartyu. Thanks for your PR. 😃 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lionheartyu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
2 similar comments
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lionheartyu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lionheartyu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @lionheartyu. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
fix url
Regressed-by: 9dd7e7f