The-CodingSloth / haha-funny-leetcode-extension

MIT License
396 stars 75 forks source link

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

Open aryanpingle opened 10 months ago

aryanpingle commented 10 months ago

A few problems with the current system:

Potential Solutions

The-CodingSloth commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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