vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Disallow HTML code in Thread Titles (https://vborg.vbsupport.ru/showthread.php?t=125726)

steadicamop 09-02-2006 10:00 PM

Disallow HTML code in Thread Titles
 
Disallow HTML code in Thread Titles v1.01

Quote:

Originally Posted by Staff Note
Staff Note:
Unmodified vBulletin will not evaluate HTML in thread titles. Using this modification without a hack installed that has security vulnerabilities is useless.

Also installing this modification, even with a modification installed that would make your board vulnerable to this type of HTML posting in thread titles, only will give you a false sense of security since there are many other options to exploit this, even without the use of the ">" character.

Everyone is encouraged to remove or update the vulnerable modification instead of using this hack.

Marco van Herwaarden.

By Jason Williams/Andrew Calderbank
03/09/2006

Recently there has been a spate of members posting html redirection code in thread titles, which when parsed on the forum homepage runs and redirects to whatever site they insert into the title.

This code simply disallows the characters < and > from being used in the thread titles, this is also is checked when editing the post.

It's fairly simple but puts to and end members signing up and posting redirect links. I don't know whether you'd class this as a hack or bug fix, but I hope this helps other members who are frustrated with this issue.

2 file edits
1 new phrase

Should be fairly straightforward to install.

**ALWAYS BACK UP FILES BEFORE YOU EDIT THEM!!**

v1.00

Original release

v1.01

Slight code update

steadicamop 09-03-2006 08:05 PM

Reserved for updates

Puck 24/7 09-03-2006 08:15 PM

Good idea, steadicamop.

edit: there seems to be a problem in: /includes/functions_newpost.php find:

error:
Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /includes/functions_newpost.php on line 379

steadicamop 09-03-2006 09:01 PM

Quote:

Originally Posted by Puck 24/7
Good idea, steadicamop.

edit: there seems to be a problem in: /includes/functions_newpost.php find:

error:
Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /includes/functions_newpost.php on line 379

Ok, replace the code for this:

Code:

        elseif (preg_match('/<|>/',$vbulletin->GPC['title']))
            eval(standard_error(fetch_error('nohtml')));

That should solve it.

Paul M 09-03-2006 09:04 PM

Both those files have hooks, can these changes not be done via plugins ?

steadicamop 09-03-2006 09:07 PM

I'll look into remaking it as a plugin - I've never dealt with creating plugins before so it's something I will have to my research on.

Snake 09-03-2006 09:08 PM

Thanks for this! :)

Paul M 09-03-2006 09:09 PM

Okay, just asking.

I think far more people are likely to make use of it if no file edits are involved. :)

steadicamop 09-03-2006 09:10 PM

Quote:

Originally Posted by Paul M
Okay, just asking.

I think far more people are likely to make use of it if no file edits are involved. :)

Something I'm going to try and do right now :D

DementedMindz 09-03-2006 10:58 PM

so even if you dont allow html they can still post html in thread titles? if thats the case it seems strange that vbulletin wouldnt patch that. as you could just do this all day long with a google search finding vbulletin sites. would suck to have to use a plugin, hack, php file edit what ever to stop it and secure your site.


All times are GMT. The time now is 09:37 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.01562 seconds
  • Memory Usage 1,738KB
  • 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_code_printable
  • (3)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