Go Back   vb.org Archive > Community Central > vBulletin.org Site Feedback
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2012, 02:43 PM
chefy chefy is offline
 
Join Date: Jul 2012
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Bug when quoting members with "[" or "]" in their nicknames

We will use for this example a random member: [Dx]. So imagine that you're quoting a post from [Dx] then the quote code should look like this:

PHP Code:
[QUOTE=[Dx];123456]something posted by [Dx][/QUOTE
However it's being parsed as this:



Breaking the quote tag.

Please fix this at vB.org and also share with us the instructions so we all the users of vB 3.x will be able to apply the fix in our own forums.
Attached Images
File Type: png bugxd.png (14.3 KB, 0 views)
Reply With Quote
  #2  
Old 07-31-2012, 04:20 PM
chefy chefy is offline
 
Join Date: Jul 2012
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can confirm that this bug is also present in vB 4.2
Reply With Quote
  #3  
Old 07-31-2012, 05:29 PM
Ziki's Avatar
Ziki Ziki is offline
 
Join Date: Nov 2005
Posts: 2,704
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice catch

Also install quote notifications on vb.org!
Reply With Quote
  #4  
Old 07-31-2012, 06:52 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The fix is not to allow [ or ] in usernames.

Its bound to clash with any BB code, not just quote, and would be very difficult to do anything about.
Reply With Quote
3 благодарности(ей) от:
BirdOPrey5, Reycer, Simon Lloyd
  #5  
Old 07-31-2012, 09:01 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you must allow daft characters in the usernames you'll have to work out a way of encapsulating it in [noparse]
Reply With Quote
  #6  
Old 08-01-2012, 09:14 PM
DivisionByZero's Avatar
DivisionByZero DivisionByZero is offline
 
Join Date: Dec 2002
Location: South Bend, Indiana
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i got sick of names like |< () R |\| and other crap a LONG time ago and disabled all but letters, numbers, underscores and dashes.
Reply With Quote
  #7  
Old 08-02-2012, 09:43 AM
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think it's too unreasonable to consider utilizing a method where square brackets would be acceptable in a BB Code's option, myself.

For example, enclosing the option in quotes or double-quotes to represent literal brackets rather than to-be-parsed brackets.

[QUOTE="[Sarteck]"]Lorem Ispum[/QUOTE]

This actually works, btw, already, when quote does not have a second parameter delimited by a semi-colon.

Quote:
Originally Posted by [Sarteck]
Lorem Ispum
The problem only exists when the second parameter exists. E.G.



[QUOTE="[Paul M]";2353120]The fix is not to allow [ or ] in usernames.[/QUOTE][/noparse][/B]

yields
[QUOTE="[Paul M]";2353120]The fix is not to allow [ or ] in usernames.[/QUOTE]






[/QUOTE][/QUOTE][/QUOTE]Anyways, to sum it up.... I disagree with the statement that the "fix" is to not allow brackets in usernames. I think the "fix" would be to fix the problem. ;)




[SIZE=1][COLOR="Silver"]--------------- Added [DATE]1343906114[/DATE] at [TIME]1343906114[/TIME] ---------------[/COLOR][/SIZE]





[QUOTE=Sarteck;2353596]My Rambling[/QUOTE]

Ah. Seems that if the [B]entire option[/B] is enclosed with quotes, everything goes smoothly.

E.G.:
[B][noparse][QUOTE="[Sarteck];2353596"]My Rambling[/QUOTE]




Quote:
Originally Posted by [Sarteck] View Post
My Rambling
:3


So, just have the Quote thingamabob enclose the stuff in quotes, yeah?

--------------- Added [DATE]1343910448[/DATE] at [TIME]1343910448[/TIME] ---------------

---------------

Aaaaaand, problem solved on vB4 if you change the newpost_quote template.

HTML Code:
[QUOTE={vb:raw originalposter}]{vb:raw pagetext}[/QUOTE]
to
HTML Code:
[QUOTE="{vb:raw originalposter}"]{vb:raw pagetext}[/QUOTE]

I don't know if vB3 (for vB.org) would have the same solution or not.
Reply With Quote
  #8  
Old 08-02-2012, 01:10 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vb.org doesnt allow such usernames, so its not an issue.
Reply With Quote
  #9  
Old 08-02-2012, 02:28 PM
chefy chefy is offline
 
Join Date: Jul 2012
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But could you share a fix like the one posted by Starteck for vB 3.8 users please?
Reply With Quote
  #10  
Old 08-02-2012, 08:58 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vBulletin 3.x has a newpost_quote template too.

You could try changing it from:

Code:
[QUOTE=$originalposter]{$pagetext}[/QUOTE]
to

Code:
[QUOTE="{$originalposter}"]{$pagetext}[/QUOTE]
No idea if it will work.

I agree with Paul the better option is not to allow such usernames- unable to predict what else they may break in the future.
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04317 seconds
  • Memory Usage 2,283KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_html
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete