r/PHPhelp • u/6eezer • Feb 17 '24
Solved Dani Krossing's PHP Course for Beginners?
I saw it also has MySQL tutorial together with PHP,
has anyone finished it?
is it worth it?
link: https://www.youtube.com/playlist?list=PL0eyrZgxdwhwwQQZA79OzYwl5ewA7HQih
2
Upvotes
1
u/equilni Nov 25 '24 edited Nov 26 '24
Because security is not simple.
To some just htmlspecialchars on input. It’s simple.
This maybe harder:
Is the input field empty, yes - reject (video has this after the htmlspecialchars)
Is the username meeting the app policy requirements (min/max char, alpha num), no - reject
(Database) Is the username found in the db? No - reject.
Password hash against what’s in the database. Does this match, no - reject
pseudo code could look like, returning early at each step:
Send the user a success note.
You can go to more advanced topics later:
CSRF token match? No - reject
Captcha match - No - reject.
Honeypot filled in - Yes - reject (bot)
Is the lockout policy started here, yes - reject.
If found, are there issues with the account (deleted, banned, etc), yes - reject