vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=125726

Disallow HTML code in Thread Titles
by steadicamop
03 Sep 2006 21:04

1 Attachment(s)
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 03 Sep 2006 21:05

Reserved for updates

Puck 24/7 03 Sep 2006 21:15

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 03 Sep 2006 22:01

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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That should solve it.

Paul M 03 Sep 2006 22:04

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

steadicamop 03 Sep 2006 22:07

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 03 Sep 2006 22:08

Thanks for this! :)

Paul M 03 Sep 2006 22:09

Okay, just asking.

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

steadicamop 03 Sep 2006 22:10

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 03 Sep 2006 23:58

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.

3.5.4 Compatible?
by Nuguru
04 Sep 2006 00:11

Hello,

I was wondering if this security issue applies to 3.5.4 and will this fix work with 3.5.4? Or how to I get the same result making code changes with 3.5.4. Advice would be appreciated.



Thank You,

Nuguru :)

eclectica 04 Sep 2006 01:59

Isn't this a vBulletin bug you are fixing?

chimaira 04 Sep 2006 12:27

Quote:

Originally Posted by steadicamop
Ok, replace the code for this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That should solve it.

replace what code with that exactly ?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

^^ that?

xman_79 04 Sep 2006 13:57

The ideea is very good , but i have a problem.

I wrote in the title a HTMl code and it worked (the html code) . I wrote the second time and the message :Could not find phrase 'nohtml' appeared.


Please tell me how can I solve the problem .

Thanks .

steadicamop 04 Sep 2006 14:54

you need to add the phrase in the text file, its the last step in the instructions:

In the AdminCP -> Language & Phrases -> Phrase Manager -> Add New Phrase

Phrase Type : Front-End Error Messages
Product : VBulletin
Varname : nohtml
Text : Sorry, you are not allowed to post HTML in Thread titles, please go back and change it.

HTH


All times are GMT. The time now is 23:48.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.