@thomasfuchs its a trap dot gif.
Conversation
Notices
-
Embed this notice
Comfortably Numb (ygalanter@hachyderm.io)'s status on Sunday, 12-Mar-2023 01:36:46 JST Comfortably Numb
-
Embed this notice
Thomas 🔭✨ (thomasfuchs@hachyderm.io)'s status on Sunday, 12-Mar-2023 01:46:15 JST Thomas 🔭✨
@ygalanter I find it super funny that the Mastodon devs clearly tried to prevent two options having the same text but failed so hard
-
Embed this notice
Comfortably Numb (ygalanter@hachyderm.io)'s status on Sunday, 12-Mar-2023 01:50:03 JST Comfortably Numb
@thomasfuchs lol, didn't know they did this. Just tried it - and it so easy to circumvent, why did they bother with the effort in the first place.
-
Embed this notice
Thomas 🔭✨ (thomasfuchs@hachyderm.io)'s status on Sunday, 12-Mar-2023 03:13:02 JST Thomas 🔭✨
@ygalanter @ZiggyTheHamster That code, yes, but there may be also other code that runs on the input in maybe the controller, e.g. stuff that strips whitespace
-
Embed this notice
Comfortably Numb (ygalanter@hachyderm.io)'s status on Sunday, 12-Mar-2023 03:13:04 JST Comfortably Numb
@ZiggyTheHamster @thomasfuchs I don't know much Ruby - but does it really just compare length of the array with length of unique elements of the array?
-
Embed this notice
Keith Gable :whyfox:🇺🇦🌻 (ziggythehamster@ruby.social)'s status on Sunday, 12-Mar-2023 03:13:05 JST Keith Gable :whyfox:🇺🇦🌻
@thomasfuchs @ygalanter The bug is pretty easy to spot:
https://github.com/mastodon/mastodon/blob/main/app/validators/poll_validator.rb#L15
-
Embed this notice
Thomas 🔭✨ (thomasfuchs@hachyderm.io)'s status on Sunday, 12-Mar-2023 03:15:57 JST Thomas 🔭✨
@ygalanter @ZiggyTheHamster yeah it runs a simple strip https://github.com/mastodon/mastodon/blob/main/app/models/poll.rb#L104
-
Embed this notice
Comfortably Numb (ygalanter@hachyderm.io)'s status on Sunday, 12-Mar-2023 03:17:35 JST Comfortably Numb
But, I mean, just replace latin "e" with Cyrillic "е" in "Yes" suddenly it's unique. And it's just one of many ways - why bother with duplicates at all. Especially if polls can be just for fun like yours.
In conversation permalink -
Embed this notice
Thomas 🔭✨ (thomasfuchs@hachyderm.io)'s status on Sunday, 12-Mar-2023 03:17:47 JST Thomas 🔭✨
@ygalanter @ZiggyTheHamster this should probably normalize whitespace before letting options go through. there's a regexp that you can use for that, e.g. I'm using it in my filename sanitizer gem https://github.com/madrobby/zaru/blob/master/lib/zaru.rb#L5
In conversation permalink Attachments
-
Embed this notice