vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Add-On Releases - Gift Subscriptions (https://vborg.vbsupport.ru/showthread.php?t=237351)

ZERO <ibis> 11-26-2010 08:52 PM

What would I need to edit to support usernames with <> for example?

I think that htmlspecialchars() needs to be in here somewhere but I do not know where it needs to go.

Note that by adding in htmlspecialchars() it should also reduce the odds that this script can be exploited.

Fixed:

Replace:
$goo=$db->query_read_slave("SELECT userid from ". TABLE_PREFIX ."user where username='".$_POST['giftname']."'");

With:
$sqlname = htmlspecialchars($_POST['giftname']);
$goo=$db->query_read_slave("SELECT userid from ". TABLE_PREFIX ."user where username='".$sqlname."'");

Kyoshokid 12-12-2010 12:13 PM

Quote:

Originally Posted by ZERO <ibis> (Post 2126104)
What would I need to edit to support usernames with <> for example?

I think that htmlspecialchars() needs to be in here somewhere but I do not know where it needs to go.

Note that by adding in htmlspecialchars() it should also reduce the odds that this script can be exploited.

Fixed:

Replace:
$goo=$db->query_read_slave("SELECT userid from ". TABLE_PREFIX ."user where username='".$_POST['giftname']."'");

With:
$sqlname = htmlspecialchars($_POST['giftname']);
$goo=$db->query_read_slave("SELECT userid from ". TABLE_PREFIX ."user where username='".$sqlname."'");


@op I just wanted to say thanks for this, my users are very happy with this mod.

@Zero this helped as i have a lot of users with weird names.

Working on vb4.1.0

ZERO <ibis> 02-19-2011 08:44 PM

1 Attachment(s)
As I now actually use vb 4 (previously I was using vb3 despite posting how to fix the error) I wanted to post a fully patched version for people to use as a base install so they do not have problems. I use this exact file myself for instructions and if it stops working for me I will post back here with an update if I manage to fix it myself.

DM BoNeZ 04-22-2012 05:24 AM

this mod is great but i tested if there is a way to choose what usergroup cant get gifted becuase i dont want any staff to get gifted the subscribed usergroup so i will have to remove it.. till there is a better gifting mod

djfoxx 05-26-2012 12:54 AM

Dosen't seem to work on v4.2

Lilmikeishere 11-22-2012 08:21 PM

Any fixes for this?

Bluefin221 03-12-2014 09:25 PM

payments.php does not exist or I cannot find it, where else should that segment of code go?

ZERO <ibis> 08-14-2014 04:45 PM

It does exist and is in the root directory for your vbb install. Also I am not sure if the one posted by the OP works or not but the one that I linked a few years back still works fine even on the latest version.

tanzeelniazi 06-30-2015 04:27 PM

its working in vb 4.2.0 or not ?
if use this mod then members paying subs like as gift ?


All times are GMT. The time now is 03:31 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.01076 seconds
  • Memory Usage 1,729KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete