Skip to content

Fix SQL and XSS injection#199

Merged
Groruk merged 2 commits intosbpp:v1.xfrom
CrazyHackGUT:v1.x
Dec 20, 2016
Merged

Fix SQL and XSS injection#199
Groruk merged 2 commits intosbpp:v1.xfrom
CrazyHackGUT:v1.x

Conversation

@CrazyHackGUT
Copy link
Contributor

@CrazyHackGUT CrazyHackGUT commented Nov 22, 2016

Something user hack my SourceBans with this injection. SourceBans "generates" PHP error due to email[] in query string, and log error in system logs. After, while opening system logs, code in <script> tags executes from message because this is not escaped. It can help hackers to steal cookies admin when entering the settings.

I hacked in this way, and I do not want to hurt anyone else.
From my system log: log screen

Sorry if that, for my English. I did not know much, I'm from Russia

@CrazyHackGUT CrazyHackGUT changed the title Fix SQL injection Fix SQL and XSS injection Nov 22, 2016
@koteq
Copy link
Contributor

koteq commented Nov 29, 2016

@CrazyHackGUT is right the vulnerability is real. Firstly because of dumb db query builder here, which should be replaced by throw statement. And secondly because of output escaping lack.

Also I have to mention that it's totally ok to use force push to modify your pull request commits.

@Technoblazed
Copy link

The majority of sourcebans is completely fucked. But no one can be bothered to do a rewrite.

@CrazyHackGUT
Copy link
Contributor Author

@Technoblazed, we have on one forum is an active discussion of whether it is necessary to rewrite the SourceBans from scratch with using framework.

@Technoblazed
Copy link

Honestly, I'll probably end up doing it next summer, because I'm always bored as fuck.

@Groruk
Copy link
Member

Groruk commented Nov 29, 2016

@galexrt and I are actually planning on rewriting SourceBans++ from scratch. Sadly, at the time we are busy with RL stuff but hope to start development in between Christmas and new year.

@Technoblazed
Copy link

@Groruk Let me know if you need anyone else :D

@Groruk Groruk merged commit 307253d into sbpp:v1.x Dec 20, 2016
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

Successfully merging this pull request may close these issues.

4 participants