The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I am testing an external script I wrote. I just discovered that the user can inject code into an UPDATE query through one of the form fields by entering clever values. For example:
UPDATE tablename SET field = '$_POST[var]' So I need to check that the posted variable is clean. I'm not sure where to start and I want to cover all possibilities. Any hints, tips, advice? thx vB3 3.0.0 I don't suppose vB3 has a function for this? |
#2
|
|||
|
|||
![]()
vB3 has the globalize() function. This works too:
PHP Code:
|
#3
|
|||
|
|||
![]()
Whoops, that's HTML injection...SQL injection is the same, but use addslashes() instead of htmlspecialchars[_uni]().
|
#4
|
||||
|
||||
![]()
Oh that makes sense... to escape bad characters.
Where is addslashes() defined? I can't find it. |
#5
|
||||
|
||||
![]() |
#6
|
||||
|
||||
![]()
thx
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|