-
Notifications
You must be signed in to change notification settings - Fork 14
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
Possible exploit: auto-clicking webapp #6
Comments
Hi, not sure if I fully understood what you mean. Can you give an example of what an instance admin could to to abuse this? The API token which is used for the POST requests should not be accessible by the web application. |
Given they own what they run, they can insert JavaScript that would trigger click event on "boost", "favorite", "follow" and other buttons for any posts of their choice. That's the gist of it.
Yes, but it doesn't stop from click emulation via |
Okay, get it now. I will look into it. A trivial way to differentiate between a user initiated click and a script initiated click would be to check for mouse coordinates. But with dispatchEvent, these could he faked as well. I can think of some other ways, but none of them can guarantee that it's a user click. So not sure yet how to differentiate reliably. Please create a pull request if you come up with sth. |
Found out that Even redefining custom event interface with faked Doing a PR now 😊👍 |
Now that's a perfect & simple solution! Did not know about this property yet. |
I added the required checks with commit 411dc65 Will be included in the next update. Cheers! |
Ah, OK, I was very busy lately anyway, so I appreciate you taking it over, @Lartsch. Good stuff! |
There is a probability of edge case where Mastodon web application might be exploited by some instance admin (or fork by association) to automatically click "boost", "favourite", "follow", etc., which can go undetected for enough time.
To recap, web application will be able to do malicious actions on behalf of the extension's user (there is few that it can do, but still significant). Already seeing a potential for
dispatchEvent
there.I don't yet know how to warrant solid safety from this exploit, here are just some options I considered:
The text was updated successfully, but these errors were encountered: