g0d / micro-MVC

An agile, small, productive and robust MVC framework for PHP with high-quality JS extensions and integrated AJAX support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Insecure storage of credentials in `auth.php`.

green-job9593 opened this issue · comments

Hello! I stubmled upon this project as I was looking for a PHP framework. I noticed that in the auth.php module the passwords as just their unsalted MD5 hash.

WHERE `username` = "' . mysqli_real_escape_string($db_conn_link, $username) . '" AND ' . '
`password` = "' . mysqli_real_escape_string($db_conn_link, md5($password)) . '" AND ' . '

This is insecure for many reasons: it is extremely easy to crack MD5 hashes, and leaks information in cases two users have the same password. I recommend you to consult guides such as https://crackstation.net/hashing-security.htm to learn how to securely hash passwords.

Thanks!

Hello you are right!

However, this is not a final solution but rather a test template as part of the module for "auth" in the framework. It is there to showcase the basic usage.

It has been noted by other fellow engineers as well, so I will updated to avoid any further misunderstandings...

Any news with this? It would be helpful to keep this issue open until it gets fixed.