vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   $userdata->set (https://vborg.vbsupport.ru/showthread.php?t=192331)

woostar 09-30-2008 05:29 PM

$userdata->set
 
Just want to check something.

Variables used with $userdata->set , are these cleansed by vbulletin or do you have to clean the variable before saving to the users profile?

EG: $userdata->set('user_referrer', $user_referrer);
Does $user_referrer need to be cleansed?

Thanks,
W.>

Guest190829 09-30-2008 05:31 PM

Quote:

Originally Posted by woostar (Post 1634052)
Just want to check something.

Variables used with $userdata->set , are these cleansed by vbulletin or do you have to clean the variable before saving to the users profile?

EG: $userdata->set('user_referrer', $user_referrer);

Thanks,
W.>

If it's a standard vBulletin data field being managed by a built in datamanager, you can assume it is being cleansed already.

woostar 09-30-2008 05:53 PM

Hi Danny :)

Basically I want to save
$_COOKIE[COOKIE_PREFIX . 'user_referrer'] (Holding members first visit $_SERVER['HTTP_REFERER'])
using the register_addmember_process hook

But as a cookie can be manipulated I wondered if it needs to be made safe of if vB does it.

Guest190829 09-30-2008 11:45 PM

Well the referer itself can be manipulated, is there a field in the database for that already? If not, you need to adjust the vBulletin datamanager before using it to add such a field.

woostar 10-01-2008 11:37 AM

The mod is running and works (if just puts where the user came from on their file).
All I need to know is if data stored in the users profile using $userdata->set is made safe for the database. What I'm worried about is someone writing a SQL injection into $_COOKIE[COOKIE_PREFIX . 'user_referrer']


All times are GMT. The time now is 02:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01091 seconds
  • Memory Usage 1,712KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete