Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 Jul 2008, 06:09
v0xb0x's Avatar
v0xb0x v0xb0x is offline
 
Join Date: Jun 2008
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.
Reply With Quote
  #2  
Old 04 Jul 2008, 18:39
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
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
__________________
Please feel free to PM me about custom work, installations, and upgrades!

Eclipse Records - Streetcult Street Team
Reply With Quote
  #3  
Old 05 Jul 2008, 07:14
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Originally Posted by Antivirus View Post
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
You mean the input cleaner class , $vbulletin->input. $vbulletin->GPC simply holds cleaned values.

You can also clean any value you want, not just GPC (get, post, cookies), using the input cleaner.
__________________
View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #4  
Old 06 Jul 2008, 22:48
v0xb0x's Avatar
v0xb0x v0xb0x is offline
 
Join Date: Jun 2008
Originally Posted by Dismounted View Post
You mean the input cleaner class , $vbulletin->input. $vbulletin->GPC simply holds cleaned values.

You can also clean any value you want, not just GPC (get, post, cookies), using the input cleaner.
Understood.

Thanks for the reply.

I'll investigate the article.

Appreciate the help.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 01:58.

Layout Options | Width: Wide Color: