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

リモートのドメイン内にあるPunycodeをパースする #12315

Open
kakkokari-gtyih opened this issue Nov 11, 2023 · 6 comments
Open
Labels
✨Feature This adds/improves/enhances a feature packages/frontend Client side specific issue/PR

Comments

@kakkokari-gtyih
Copy link
Contributor

Summary

image

クライアント上での見た目だけでも何とかしたい

Purpose

正しいドメイン名を表示したい

@kakkokari-gtyih kakkokari-gtyih added the ✨Feature This adds/improves/enhances a feature label Nov 11, 2023
@1673beta
Copy link

こういう所もありますし、使われるかどうかは別としてあってもいいような気はします

@Srgr0
Copy link
Collaborator

Srgr0 commented Nov 12, 2023

ややoff-topicですが、Misskey側の問題ではないとはいえPunycodeはドメイン名偽装問題があるため、Unicode文字に変換して表示する場合はその旨の注意を出すなどの検討が必要かと思います。

@GrapeApple0
Copy link
Contributor

@id@パーズしたドメイン(生のドメイン)または@id@パーズしたドメイン(@id@生のドメイン)というのがわかりやすそうな気がします

@syuilo syuilo added the packages/frontend Client side specific issue/PR label Nov 12, 2023
@syuilo
Copy link
Member

syuilo commented Nov 15, 2023

Punycode面倒ごとが多いから積極的なサポートはしたくない感があるわね
@id@パーズしたドメインという表示をしてもそれをメンションで使えるわけではない(MFMが対応してないし対応予定もない)から混乱を招きそう
やるとしたら
@id@生ドメイン (パースしたドメイン)が良いと思う

@kakkokari-gtyih
Copy link
Contributor Author

すでにMkMentionではpunycodeのパースができてるっぽい?

image

@GrapeApple0
Copy link
Contributor

MkMentionではPunycodeのパーズをしていました

const canonical = props.host === localHost ? `@${props.username}` : `@${props.username}@${toUnicode(props.host)}`;

補足ですがMkUrlもしていました
const hostname = decodePunycode(url.hostname);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature packages/frontend Client side specific issue/PR
Projects
None yet
Development

No branches or pull requests

5 participants