vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Fix for replacement code problem in vB Code (https://vborg.vbsupport.ru/showthread.php?t=35894)

Steve Machol 03-08-2002 10:00 PM

Fix for replacement code problem in vB Code
 
I'm almost embarrassed to call this a 'hack', particularly sincve it's not even mine! :stupid: Actually the code came from FireFly who PM'd me with the answer to this problem I posted on vb.com:

http://www.vbulletin.com/forum/showt...threadid=41430

The problem arises if you try to use replacement variables in vB Code. Beginning with 2.2.3, this no longer works. However the fix (thanks to Chen!) is simple. Just remove or comment out this line from admin/functions.php:

PHP Code:

$bbcode=str_replace("{""{"$bbcode); // stop people posting replacements in their posts 

Of course remving this line will cause the problem of people using replacement variables in posts. However in my case it's a good trade-off.

neal 03-09-2002 05:33 AM

isn't this corrected in 2.2.3?

Admin 03-09-2002 05:33 AM

No, this is caused by v2.2.3.

neal 03-09-2002 05:36 AM

oh, ok. Thanks then, I'm installing

Mr. X 03-09-2002 05:39 AM

Excellent. The quote looks great now, however Im still confused as to how do do this with PHP and list code.

Scrub 03-09-2002 02:56 PM

I do not understand this!? :confused:

Steve Machol 03-09-2002 03:43 PM

Quote:

Originally posted by Mr. X
Excellent. The quote looks great now, however Im still confused as to how do do this with PHP and list code.
Those are hardcoded into the script and cannot be altered by vB Code. To change them would require further hacking.

Mr. X 03-09-2002 06:52 PM

so it only works on vb.org?

Wayne Luke 03-09-2002 10:01 PM

I think that line of code is part of the cross-site scripting issue that was plugged in 2.2.3. While I don't think it will expose you to the entire problem it does present a weakness.

TECK 03-09-2002 11:38 PM

this is not changed in 223b grrrr...
lol i got it now.. damn i'm slow sometimes.. this line must be removed only if you installed firefly's hack


All times are GMT. The time now is 11:53 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
  • Page Generation 0.02367 seconds
  • Memory Usage 1,726KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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