askvortsov1/flarum-pwa

Symbol (@) in nickname can prevent push notifications

Closed this issue · 3 comments

I had the extension running fine on browsers and had push notifications showing. But if a user has an @ in their nickname, a reply to them wouldn't post at all. This was not happening without the extension, AFAIK. Once the symbol was removed, the notifications resumed working normally.

Not a big deal for me. I added a regex for nicknames to allow alphanumeric nicknames only. But figured it was worth reporting in case it helps. Will keep testing it further.

Thanks!

Very weird. After further testing, if I reply to any post mention a user who has set a nickname, it fails with the red "Something went wrong" popup. Nothing in the log.

If posting without a mention, then it posts fine. If mentioning a user who has never set a nickname, then that also works.

Could the user being logged into 2 devices (PC and phone) be the issue?

Disabling the PWA extension fixes the issue.

~/api/post throws a 500 error. And this is what the browser tools show.

[x] Message failed to sent for subscription https://updates.push.services.mozilla.com/wpush/v1/gAAAAABgAf0Ri0QPmS4mvHNnq-Xseb6L38yFWKO6sqVpFF78kQDjdFkCti4K7Wap3CBHkQNJ7WR9S93PDA4clqEz7TXS73fCt1EHwCBouoTx8-5z9fakueA7SSFCPjqtW71KG38fuzLk: Client error: `POST https://updates.push.services.mozilla.com/wpush/v1/gAAAAABgAf0Ri0QPmS4mvHNnq-Xseb6L38yFWKO6sqVpFF78kQDjdFkCti4K7Wap3CBHkQNJ7WR9S93PDA4clqEz7TXS73fCt1EHwCBouoTx8-5z9fakueA7SSFCPjqtW71KG38fuzLk` resulted in a `413 Request Entity Too Large` response: {"code": 413, "errno": 104, "error": "Payload Too Large", "more_info": "http://autopush.readthedocs.io/en/latest/http.ht (truncated...)

(Same in FF, Edge, FF developed edition)

Hi, sorry for the delay in getting back to you on this. Looks like I forgot to truncate the subject line: added for the next release. Thanks for the report!