![]() |
SQL injection
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? |
vB3 has the globalize() function. This works too:
PHP Code:
|
Whoops, that's HTML injection...SQL injection is the same, but use addslashes() instead of htmlspecialchars[_uni]().
|
Oh that makes sense... to escape bad characters.
Where is addslashes() defined? I can't find it. |
|
thx
|
All times are GMT. The time now is 03:33 AM. |
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:
|