HiveBrain v1.2.0
Get Started
← Back to all entries
patternphpMinor

A PHP Toolkit of some functions

Submitted by: @import:stackexchange-codereview··
0
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 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.