Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL injection vulnerabilities #9

Open
dbursem opened this issue Feb 5, 2015 · 3 comments
Open

SQL injection vulnerabilities #9

dbursem opened this issue Feb 5, 2015 · 3 comments

Comments

@dbursem
Copy link
Contributor

dbursem commented Feb 5, 2015

The code is vulnerable to SQL injection, use prepared statements for queries with user input!

@cunimb
Copy link
Contributor

cunimb commented Feb 6, 2015

I don't know if PDO is enable on the server, Seb can you confirm?
Other scripts (not yet on github) use sql.php, I need to publish them before to manage all database access with PDO.

@dbursem
Copy link
Contributor Author

dbursem commented Feb 6, 2015

PDO should be enabled by default since 2005 or something so it probably is unless somebody explicitly compiled PHP without...

I added the mysql_connect() functions back to the sql.php file so you can keep using it, but really you should look into this. The mysql_ functions have been deprecated since PHP5.5 and better alternatives have been around quite a while! I'm not much of a hacker but I still managed to do some very simple sql injections on live.glidernet.org yesterday (nothing harmfull).

If you release those other files, maybe I can look into them too. Would be nice to have a database schema though, so I can properly test it before comitting.

@snip
Copy link
Contributor

snip commented Feb 6, 2015

PDO is supported by the webserver.
You can check this on: http://live.glidernet.org/phpinfo.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants