Skip to content

fix: preserve custom URI schemes in %U/%u Exec field expansion#373

Open
lionheartyu wants to merge 1 commit into
linuxdeepin:masterfrom
lionheartyu:fix/custom-uri-scheme-rewrite
Open

fix: preserve custom URI schemes in %U/%u Exec field expansion#373
lionheartyu wants to merge 1 commit into
linuxdeepin:masterfrom
lionheartyu:fix/custom-uri-scheme-rewrite

Conversation

@lionheartyu

@lionheartyu lionheartyu commented Jun 30, 2026

Copy link
Copy Markdown

fix url
Regressed-by: 9dd7e7f

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @lionheartyu, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@github-actions

Copy link
Copy Markdown

CLA Assistant Lite bot:

如果你是以企业贡献者的身份进行提交,请联系我们签署企业贡献者许可协议
If you submit as corporate contributor, please contact us to sign our Corporate Contributor License Agreement

感谢您的提交,我们非常感谢。 像许多开源项目一样,在接受您的贡献之前,我们要求您签署我们的个人贡献者许可协议。 您只需发布与以下格式相同的评论即可签署个人贡献者许可协议
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Individual Contributor License Agreement before we can accept your contribution. You can sign the Individual Contributor License Agreement by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA.

You can retrigger this bot by commenting recheck in this Pull Request

@deepin-ci-robot

Copy link
Copy Markdown

Hi @lionheartyu. Thanks for your PR. 😃

@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

2 similar comments
@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants