patternphpMinor
A PHP Toolkit of some functions
Viewed 0 times
toolkitphpfunctionssome
Problem
Any major security risks? And please don't get angry over my novice log system.
Solution
You home brewed security hashes and such are a big NO. Please, check here and here for a good read regarding that. Also, please do not hash a hash, that can lead to collisions and should be avoided! Using a method such as
You're using
And then your function
password_hash() creates a salt for you, therefore you shouldn't have to make one on your own.You're using
mysql_real_escape_string() which is not the way to go. If possible, move away from that and onto mysqli or PDO.And then your function
htent() is sort of redundant. You don't have anything else in the function, so it shouldn't be needed.Context
StackExchange Code Review Q#41921, answer score: 4
Revisions (0)
No revisions yet.