Re:Creative usernames and Spotify account hijacking
by dan_manges on Tuesday June 18, 2013 @07:06PM
(#5902621)
Based on their description of the bug, it sounded like the code was modular, but they called the function twice: once when the password reset request was generated, and again when the link in the email was clicked.
So after they sent the password reset link, they called "fetchUserIdByName" again, but they passed in a username that had already been canonicalized once. Because of this bug, I wonder if password resets worked at all for users with unicode characters in their names.
[ Parent
| on HN ]
Re:Creative usernames and Spotify account hijacking
by mmahemoff on Tuesday June 18, 2013 @07:58PM
(#5902831)
If you're saying canonicalise(canonicalise(name)) is not the same as canonicalise(name), that's going to be seriously bug-prone. Idempotence ftw.
Re:Creative usernames and Spotify account hijacking
by sanderjd on Tuesday June 18, 2013 @08:48PM
(#5903010)
You should read the article. It prominently features a very interesting description of precisely why their `canonicalise` function turned out to not be idempotent, even though it was meant to be.
Re:Creative usernames and Spotify account hijacking
by spicyj on Tuesday June 18, 2013 @08:24PM
(#5902916)
That's exactly what they describe as the cause of the bug. They intended for the function to be idempotent but it wasn't because of a misunderstanding with the Python library spec.