Skip to content

Security problems #1

@VanNostrand

Description

@VanNostrand

.config_commonfunctions is vulnerable to SQL injections: All functions with SQL statements are problematic.
This means, the database can easily be manipulated/read/vandalized by unauthorized people and the authentication.php allows any blackhat to login as admin this way.

One code example can be found in add_user:
mysql_query("INSERT INTO " [...] VALUES ('" . trim($username) . "','" . trim($encryptedpassword) . "',1,'" . $registrationdate . "')");

Never insert data from html forms or the GET/POST environment in general into SQL statements. See http://bobby-tables.com/ and http://php.net/manual/en/security.database.sql-injection.php for more information.

Also, as the user inputs are not checked or escaped, other security problems can be possible, like executing commands etc.

Note: mysql_query will be deprecated in php 5.5.0, so it can be changed to MySQLi or PDO_MYSQL (they use prepared statements with bound variables) while fixing the security problem :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions