Skip to content
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

openpgp4frp uri on mac not working #1969

Closed
Jikstra opened this issue May 5, 2020 · 11 comments · Fixed by #5212
Closed

openpgp4frp uri on mac not working #1969

Jikstra opened this issue May 5, 2020 · 11 comments · Fixed by #5212
Assignees
Labels
bug Something is not working

Comments

@Jikstra
Copy link
Contributor

Jikstra commented May 5, 2020

For some reason the openpgp4fpr uris get slightly changed when openend on mac.
Original: B1DBA3C28FD67767738677061B6DCEF1CF5CDA98#a=delta%2Didentity%40testrun.org&g=LoginBot%20group%20%281316%29&x=k8emwgc7-4v&i=g6gjemwZ3_x&s=_3MdmNR39RP
Altered: B1DBA3C28FD67767738677061B6DCEF1CF5CDA98%23a=delta%2Didentity%40testrun.org&g=LoginBot%20group%20%281316%29&x=k8emwgc7-4v&i=g6gjemwZ3_x&s=_3MdmNR39RP

Basically the # is getting replaced with %23

@Simon-Laux
Copy link
Member

Look like we need to use URI decode on it.

@Jikstra
Copy link
Contributor Author

Jikstra commented May 11, 2020

No just patch the core to handle this. The core is already handling similiar problems.

@Simon-Laux
Copy link
Member

only the # is encoded? strange

@Simon-Laux Simon-Laux transferred this issue from deltachat/deltachat-desktop Oct 6, 2020
@r10s r10s added the bug Something is not working label Nov 10, 2020
@r10s
Copy link
Member

r10s commented Sep 5, 2021

closing this stale issue here, it is unclear if a core change is actually required and there is deltachat/deltachat-desktop#2257 to track the bug.

@r10s r10s closed this as completed Sep 5, 2021
@Simon-Laux
Copy link
Member

Simon-Laux commented Sep 5, 2021

nope, deltachat/deltachat-desktop#2257 is a different issue:

As the other uri-decoding also happens in core I believe this quirk should also be handled in the core.

@Simon-Laux Simon-Laux reopened this Sep 5, 2021
@r10s
Copy link
Member

r10s commented Sep 5, 2021

As the other uri-decoding also happens in core I believe this quirk should also be handled in the core.

what exactly shall core do? replacing %23 by # in dc_check_qr() and related functions? that may be a lot of places, not sure if that would be the correct way to fix the issue.

@r10s
Copy link
Member

r10s commented Mar 7, 2022

ping @Jikstra @Simon-Laux can you please specify the actionable item in more detail? otherwise, as mentioned above, i suggest to close this issue until things are clearer.

@Simon-Laux
Copy link
Member

can you please specify the actionable item in more detail

core should be able to also read those "escaped" qr-codes/URI's too, maybe by replacing the first %23 by #

@Simon-Laux
Copy link
Member

Simon-Laux commented Mar 10, 2022

not sure if that would be the correct way to fix the issue.

the "correct" way to fix would probably be inside of macOS (or maybe its a platform specific bug in electron?), but then even if apple fixes it users rely on updates to get it. so doing it in core would be faster.

Simon-Laux added a commit to deltachat/deltachat-desktop that referenced this issue Mar 13, 2022
closes #2257
show qr code content if decoding failed
also add a workaround for deltachat/deltachat-core-rust#1969
until core can accept both.
@Simon-Laux
Copy link
Member

added a workaround for this in desktop, but we should really handle that stuff in core so new clients like dc40 do not have to care about handling that macOS quirk.

Jikstra pushed a commit to deltachat/deltachat-desktop that referenced this issue Mar 13, 2022
closes #2257
show qr code content if decoding failed
also add a workaround for deltachat/deltachat-core-rust#1969
until core can accept both.
@Simon-Laux
Copy link
Member

look what I just found in the iOS source code:

let urlString = url.absoluteString
                           .replacingOccurrences(of: "openpgp4fpr", with: "OPENPGP4FPR", options: .literal, range: nil)
                           .replacingOccurrences(of: "%23", with: "#", options: .literal, range: nil)

iOS is implementing the workaround too ;)

@Simon-Laux Simon-Laux reopened this Jan 24, 2024
@Simon-Laux Simon-Laux self-assigned this Jan 24, 2024
Simon-Laux added a commit that referenced this issue Jan 24, 2024
fixes #1969

Bug description:
macOS and iOS sometimes replace the # with %23 (uri encode it), we should be able to parse this wrong format too, see issue #1969 for more info
Simon-Laux added a commit that referenced this issue Jan 24, 2024
fixes #1969

Bug description:
macOS and iOS sometimes replace the # with %23 (uri encode it), we should be able to parse this wrong format too, see issue #1969 for more info
Simon-Laux added a commit that referenced this issue Jan 24, 2024
fixes #1969

Bug description:
macOS and iOS sometimes replace the # with %23 (uri encode it), we should be able to parse this wrong format too, see issue #1969 for more info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants