Skip to content
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

Exploit: Submit an easy problem that you've solved already #29

Open
aryanpingle opened this issue Sep 9, 2023 · 3 comments
Open

Exploit: Submit an easy problem that you've solved already #29

aryanpingle opened this issue Sep 9, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@aryanpingle
Copy link

A few problems with the current system:

  • The extension doesn't care what problem you solve, as long as you submit something successfully. That means I can navigate to an easy problem and submit the solution.
  • Even worse, it doesn't check if you've solved the given problem already. In that case you can just resubmit the solution saved by LC and you're done.

Potential Solutions

  • Make sure the submission-checker takes into account the problem statement
  • Use the publicly available, free-to-use LeetCode API's to go through all of the user's submissions and make sure your random problem isn't in those already. We can easily assume the list of the user's solved problems is <= 1,000,000 XD
@The-CodingSloth The-CodingSloth added the bug Something isn't working label Sep 9, 2023
@The-CodingSloth
Copy link
Owner

The-CodingSloth commented Sep 9, 2023

haha yeah that's one of the big exploits. My plan so far is this:

  1. For the first issue, Simply do a check if the user's current leetcode url that they're on equals the assigned problem url, and if it is then it should activate, if it's anything else it won't count.
  2. For the second issue try to delete the already saved submission, and lock their submission tab (probably through the content files)
    If anyone has better ideas or wants to do this themselves feel free

@aryanpingle
Copy link
Author

I'll try to code up a solution for the first one, and try to put a link here that lets you get a JSON of the user's solved problems.

BTW, love the idea for this extension, hope it becomes a big thing :)

@The-CodingSloth
Copy link
Owner

The-CodingSloth commented Sep 9, 2023

sweet thanks so much I appreciate it a lot. It'd be funny if this extension actually got popular.
Another idea to prevent resubmission (idea just came to my mind): Could add a timer where if they make a submission in less than 1-5 minutes after being redirected (mess around with this timer), the problem shouldn't count since I doubt they solved a leetcode problem that fast.
Could also show a funny message saying "Wow you really used an old submission, you monster" something along the lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants