vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin.org Site Feedback (https://vborg.vbsupport.ru/forumdisplay.php?f=7)
-   -   Bug when quoting members with "[" or "]" in their nicknames (https://vborg.vbsupport.ru/showthread.php?t=286107)

chefy 07-30-2012 02:43 PM

Bug when quoting members with "[" or "]" in their nicknames
 
1 Attachment(s)
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:

https://vborg.vbsupport.ru/attachmen...1&d=1343662839

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.

chefy 07-31-2012 04:20 PM

I can confirm that this bug is also present in vB 4.2

Ziki 07-31-2012 05:29 PM

Nice catch :)

Also install quote notifications on vb.org!

Paul M 07-31-2012 06:52 PM

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.

Simon Lloyd 07-31-2012 09:01 PM

If you must allow daft characters in the usernames you'll have to work out a way of encapsulating it in [noparse]

DivisionByZero 08-01-2012 09:14 PM

i got sick of names like |< () R |\| and other crap a LONG time ago and disabled all but letters, numbers, underscores and dashes.

Sarteck 08-02-2012 09:43 AM

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] (Post 2353596)
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.

Paul M 08-02-2012 01:10 PM

vb.org doesnt allow such usernames, so its not an issue.

chefy 08-02-2012 02:28 PM

But could you share a fix like the one posted by Starteck for vB 3.8 users please?

BirdOPrey5 08-02-2012 08:58 PM

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.


All times are GMT. The time now is 01: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.01027 seconds
  • Memory Usage 1,740KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (2)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