princekhunt / privateping

PrivatePing is a secure messaging application built on Python's Django framework, providing end-to-end encryption for messages exchanged between users.
https://privateping.bytespot.tech
MIT License
125 stars 30 forks source link

[ FEATURE ] : Informative feedback to the user searching for a username to connect. #13

Open kshavp opened 2 weeks ago

kshavp commented 2 weeks ago

Is your feature request related to a problem? Please describe. The feedback from the application that the username does not exist should be informative to the user, thus we can show some "user not found" related feedback instead of what we see in the attached media.

Describe the solution you'd like We can have a toast/popup/alert component to show the feedback.

image

@princekhunt I'd like to implement this feature under SSOC

princekhunt commented 2 weeks ago

So you'll show toast on each keystroke or on final hit ?

kshavp commented 2 weeks ago

The final hit of course, the mechanism will be same as it is working now, I'll just show a toast if the user does not exist when the button is clicked.

princekhunt commented 2 weeks ago

Button is set to be disabled till a valid username (of friend) is entered.

You can enable it, and show toast if, a username is not valid. is this your solution ?

kshavp commented 2 weeks ago

Yes, this is because the button is disabled at the client level, using disabled attribute, which can be easily removed using inspect element and thus this creates a vulnerability.

Thus, for now even if the button is disabled, it is not enough to stop the user. Have a look on the attached media, I have performed a search after removing the disabled attribute manually.

image

Thus we can possibly avoid this.

princekhunt commented 2 weeks ago

Got it.

princekhunt commented 2 weeks ago

Any update ?

kshavp commented 2 weeks ago

I'm enhancing my current validations as I found something more critical: image

If someone bypasses the add button without actually entering anything, it reveals a few backend side properties.

princekhunt commented 2 weeks ago

Because you're running development server with DEBUG=True in settings. Could you check the same behaviour on production at https://privateping.bytespot.tech ?

kshavp commented 1 week ago

image In production i guess its safe.

princekhunt commented 2 days ago

Kindly make PR before End of the day, else issue will be open to all to be assigned.