realroyxu / CITS3403-MurderMystery

A repo for UWA CITS3403's group project
GNU General Public License v3.0
1 stars 0 forks source link

Serverside validation for post's solved mark #71

Closed realroyxu closed 4 months ago

realroyxu commented 4 months ago

Solving a post will mark the post as 'solved' in DB, however nothing in js/server prevent repetitive submitting, and there's no answer reveal when it's already solved. There's one server side checking already for failed player resubmitting guesss by api -- they can't do that

realroyxu commented 4 months ago

Also need to change default post type as "unsolved", we can just keep these 2 Or we can keep difficulty, can display them on page.

Aifert commented 4 months ago

can create another db that saves post id with boolean, solve or unsolved. if someone tries to submit, will go through a check if it's solved. If not solve let them submit if not then we go error page

realroyxu commented 4 months ago

we can just reuse current field posttype the only issue is it's not boolean and user might set it as "solved". advantage: user can customize posttype, price is we have to do a validation to prevent posted as "solved".

Aifert commented 4 months ago

aha! good spot

Aifert commented 4 months ago

instead of just setting it as solved, we can use our hash library then. we can maybe set all posts that are solved to be idk FUCK LINUS, pass it into hash library and save it as a post type

Aifert commented 4 months ago

look into change_password I wrote earlier

realroyxu commented 4 months ago

good point I'll leave it to you secure is not on top priority now it's just good to have we'll need core functions first

Aifert commented 4 months ago

ok let me know how far you get

realroyxu commented 4 months ago

Done: image upload

realroyxu commented 4 months ago

Done. I'm lazy so I don't link PR here.