![]() |
Alternate fix to injection code in comments
So, in another thread it was mentioned that the current fix may get the job done, its also filtering out good data. There must be some proper solution to handle incoming comment data securely. I thought I would start a discussion in regards to finding an alternate fix to the problem then the one currently available.
The problem: Users input data into comments that is executed and causes trouble. Solution ideas: Escape incoming data so that it cannot execute? Allow only alphanumeric comment data and write the SQL statements so that they cannot be broken out? I will be the first to admit I am not a professional coder, although I do write a lot of code myself. I haven't taken a long look at how the comments are currently handled, but plan to. Lets pool some ideas and help MrZeroPage come up with a more solid fix! |
I do a few things.
First off, I almost ALWAYS use sprintf(). It's pretty awesome. PHP Code:
Two, why not use vBulletin's built-in cleaning functions on data? That would solve a lot of it, wouldn't it? Mind you, I'm a complete newbie to the scripting of this modification in particular, but I have successfully programmed a bunch of homebrewed mods for my own. I just want a disclaimer here that I could be completely off-base. X3 |
Starting with 2.7.1+
To fix that exploit was to edit one line.. PHP Code:
PHP Code:
Quote:
|
See? Perfect example of where sprintf() would be put to awesome use. :D Just use %d in your query and you're good to go.
|
Wait, so it wasn't the comments that were causing the problem, but the S_ID? My board personally was not hit by this exploit, so I did not have the details. :)
|
Quote:
|
Quote:
|
Quote:
|
the only thing needed is what stangger posted above..
--------------- Added [DATE]1330552106[/DATE] at [TIME]1330552106[/TIME] --------------- Quote:
|
Quote:
|
All times are GMT. The time now is 10:40 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|