ComputerScienceSoceityNITS / ComplaintBox_CPP

0 stars 9 forks source link

Hash Passwords #9

Open Binit08 opened 2 months ago

Binit08 commented 2 months ago

Difficulty: 🟡 Medium Labels: enhancement, security, auth

📝 Description: Currently, passwords are stored in plain text in the database, which poses a major security risk. If the database is compromised, all user credentials are exposed.

🎯 Goal: Use a cryptographic hashing library such as OpenSSL or bcrypt to securely store hashed passwords instead of raw text.

Eshan549 commented 2 months ago

Hi @Binit08 bhaiya, I'd like to quickly resolve this issue. My plan is to implement bcrypt hashing using libbcrypt to ensure passwords are stored securely. Given the urgency, I'll submit the PR within 24 hours.

Could you please assign this issue to me promptly? Thanks!

rupjyoti-patgiri commented 2 months ago

Assigned

HilariousSoupXD commented 2 months ago

Since Eshan549 hasn't yet made a PR, I would like to offer my idea to fix the above solution:

  1. Hash passwords before inserting them into the DB.
  2. Verify password input by hashing it and comparing with stored hash.
  3. Use SHA-256f hashing.

I understand this issue has already been assigned but would none the less appreciate if my PR would be considered as well. Other than that, it's a fun problem to tackle and the experience alone would suffice otherwise.