The Arcive of vBulletin Modifications Site. |
|
Alternate fix to injection code in comments Details »»
|
|||||||||||||||||||||||||||
|
Alternate fix to injection code in comments
Developer Last Online: Nov 2013
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! Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
||||
|
||||
|
Starting with 2.7.1+
To fix that exploit was to edit one line.. PHP Code:
PHP Code:
Quote:
|
|
#4
|
||||
|
||||
|
See? Perfect example of where sprintf() would be put to awesome use.
Just use %d in your query and you're good to go.
|
|
#5
|
|||
|
|||
|
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.
|
|
#6
|
|||
|
|||
|
I have a feeling that the code Stangger has posted was the fix for the exploit that was fixed in 2.7.1, rather than 2.7.2.
|
|
#7
|
||||
|
||||
|
I didnt know anything about a exploit with 2.7.2..
|
|
#8
|
|||
|
|||
|
No I meant FIXED in 2.7.2.
|
|
#9
|
||||
|
||||
|
the only thing needed is what stangger posted above..
--------------- Added [DATE]1330552106[/DATE] at [TIME]1330552106[/TIME] --------------- Quote:
|
|
#10
|
||||
|
||||
|
|
![]() |
|
|