The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Variable declaration and sanitization!
I have a series of variables I am declaring in a plug-in that fires in global_start.
These variables are all strings. What is the best way to sanitize the variables? Currently, I am declaring them like this: $ccDiscVar = ''; $ccHomeVar = ''; $ccCaleVar = ''; $ccBaseCity = ''; $urlArray = ''; [CODE FOLLOWS] Thanks for any comments. |
#2
|
||||
|
||||
If you're getting them from $_POST, $_GET, or $_REQUEST, they should be cleaned using the $vbuletin->GPC class. There's a really good tuitorial in the articles section about this
|
#3
|
||||
|
||||
Quote:
You can also clean any value you want, not just GPC (get, post, cookies), using the input cleaner. |
#4
|
||||
|
||||
Quote:
Thanks for the reply. I'll investigate the article. Appreciate the help. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|