Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: A3 XSS Attack #300

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Fix: A3 XSS Attack #300

wants to merge 16 commits into from

Conversation

maytlead
Copy link

  • Make cookie only accessible via http to prevent XSS attack
  • Run the server as https
  • Enable autoescape for XSS

maytlead and others added 16 commits October 24, 2023 16:57
- Remove all eval functions in converting the user inputs
- Convert eval to parseInt
- Remove direct using of request data
- Add the validation to request data
- Remove direct use user input in logging
- Log out the encoded logging context
- Change input type number
- Use hashed password for seeding the data
- Before saving the password, hash it
- Compare the password with hash method
- Add password protection using length, complexity
- Regenerating the session whenever the user log in
- Use idential error message for both username and password to not expose
  what is wrong to the attacker
Fix: A2-1 Session Management
Fix: A2-2 Password Protection
- Make cookie only accessible via http to prevent XSS attack
- Run the server as https
- Enable autoescape for XSS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant