farisfaikar / wayry

WAYRY (Short for Why Are You Repeating Yourself) is an app where you can track the speech patterns of a person!
https://wayry.vercel.app
MIT License
5 stars 9 forks source link

bug: url parameter can effect the words and the name #10

Open NekoJar opened 2 months ago

NekoJar commented 2 months ago

here's the bug I found https://github.com/user-attachments/assets/edb1563b-4ab3-4cc7-98e2-5586af7c20f4

farisfaikar commented 2 months ago

Yeah, putting sentence and person in the URL params might not be the best idea. It worked before because I haven't incorporated the people table. Thanks!

farisfaikar commented 1 month ago

Reopening this because users can still poison the URL to change the app's behaviour

Zaid-B24 commented 1 month ago

hey, do you want the user changes to URL to redirect them to home page or should it not affect the items on home page..?

farisfaikar commented 1 month ago

Hi, @Zaid-B24. This has been quite a problem for me because the app ideally should handle guest and logged-in user's count pages differently. Logged-in users should probably use person_id instead of person (name) for the search params.

That being said, I think the best course of action right now is to redirect logged-in users to the home page if the person param doesn't exist on the list of people the logged-in user has. However, guest users should be able to change the search params freely, because they are unable to save the records anyways.

Let me know if you understand what I mean, because this is not an easy issue as it may require big refactorings to take place.

Zaid-B24 commented 1 month ago

Hi, @farisfaikar, I think I understood what you meant, you want that logged in user can also change the search param, but he should be redirected to the home page as his record is being saved anyways but those users that are not logged in, they can freely make any changes they want as their record is not being saved, correct me if I'm wrong.

farisfaikar commented 4 weeks ago

@Zaid-B24, yes you can try and implement it as such and we'll see how it looks