misskey-dev / misskey

๐ŸŒŽ A completely free and open interplanetary microblogging platform ๐Ÿš€
https://misskey-hub.net/
GNU Affero General Public License v3.0
10.11k stars 1.38k forks source link

Client shows wrong host when mentioning an invalid username #8050

Open rakino opened 2 years ago

rakino commented 2 years ago

๐Ÿ’ก Summary

When mentioning a user (who is out of fediverse, with an invalid username for Misskey, @็”จๆˆท@weibo.com for example), client ignores the username and treat the host as that.

๐Ÿ™‚ Expected Behavior

@a@example.com mentions @็”จๆˆท@weibo.com, which is not a valid account.

โ˜น๏ธ Actual Behavior

@a@example.com mentions @weibo@example.com, which is shown as @็”จๆˆท@weibo@example.com.com

๐Ÿ“ Steps to Reproduce

1. 2. 3.

๐Ÿ“Œ Environment

Misskey 12.98.0 (docker)

outloudvi commented 2 years ago

Seems to be reproducible.

It seems to be actually complicated because we cannot easily know if we can really tag a person or if the domain is ActivityPub-compliant. For example, Pleroma's pleroma-fe will really do a lookup through WebFinger to see if the tagged user is there, otherwise reject to tag the user and just show the text as plain text.

image

Johann150 commented 2 years ago

I think there are two separate issues here:

  1. Things that should not be parsed as mentions. (MFM parsing is handled in a separate repository at https://github.com/misskey-dev/mfm.js)
  2. Things that should be parsed as mentions, but the account does not exist.
Johann150 commented 2 years ago

I made a new issue for the original problem on the MFM repository.

@outloudvi what you were describing is something else so please open a separate issue if you are still concerned about it.

marihachi commented 2 years ago

MFMใƒ‘ใƒผใ‚ตใƒผ(mfm.js)ใจใ—ใฆใฏๅ•้กŒใ‚’ๅ›ž้ฟใงใใ‚‹ใ‹ใ‚‚็Ÿฅใ‚Œใพใ›ใ‚“ใŒใ€MisskeyใŒใใฎๅฝขๅผใฎใƒกใƒณใ‚ทใƒงใƒณใ‚’ไธ€่ˆฌ็š„ใชใ‚‚ใฎใจใ—ใฆๅ—ใ‘ๅ…ฅใ‚Œใฆใ€ๅ•้กŒใ‚’ๅ›ž้ฟใ—ใ‚ˆใ†ใจใ™ใ‚‹ใ‹ใฉใ†ใ‹ใฏ่ญฐ่ซ–ใŒๅฟ…่ฆใงใ™ใ€‚