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

fix source code links in app picker #4637

Merged
merged 3 commits into from
Feb 14, 2025
Merged

fix source code links in app picker #4637

merged 3 commits into from
Feb 14, 2025

Conversation

Simon-Laux
Copy link
Member

fix #4631

@Simon-Laux Simon-Laux added the bug Something isn't working label Feb 13, 2025
Copy link
Collaborator

@WofWca WofWca left a comment

Choose a reason for hiding this comment

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

This makes it work.

Though I wonder if we want a punycode warning as in here?:

export const Link = ({
destination,
tabIndex,
}: {
destination: LinkDestination
tabIndex: -1 | 0
}) => {
const { openDialog } = useDialog()
const openLinkSafely = useOpenLinkSafely()
const accountId = selectedAccountId()
const { target, punycode } = destination
const processQr = useProcessQr()
const asciiUrl = punycode ? punycode.punycode_encoded_url : target
const onClick = (ev: any) => {
ev.preventDefault()
ev.stopPropagation()
if (isInviteLink(target)) {
processQr(accountId, target)
return
}
if (punycode) {
openDialog(PunycodeUrlConfirmationDialog, {
originalHostname: punycode.original_hostname,
asciiHostname: punycode.ascii_hostname,
asciiUrl: punycode.punycode_encoded_url,
})
} else {
openLinkSafely(accountId, target)

@Simon-Laux
Copy link
Member Author

Simon-Laux commented Feb 13, 2025

Though I wonder if we want a punycode warning as in here?:

we can make an issue for that, good idea.

maybe we should also expose a separate api in message parser lib to check links for puny code.

But here is is not a blocker, because phishing here is unlikely.

@Simon-Laux Simon-Laux merged commit e229574 into main Feb 14, 2025
12 checks passed
@Simon-Laux Simon-Laux deleted the simon/i4631 branch February 14, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Links in app picker don't work
3 participants