Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 BUG+FIX: badwords not fully masked
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

SirZooro
Starting Member

Poland
12 Posts

Posted - 23 May 2005 :  03:06:17  Show Profile
Hello,
Create badwords list as follows:
f* -> ****
f*ing -> *******

When user type f*ing, forum replace it with ****ing instead of *******.

Fix: barword list loaded from DB should be sorted by length of badword, desc:
inc_func_common.asp, line 208:

		strSqlb = "SELECT B_BADWORD, B_REPLACE " 
		strSqlb = strSqlb & " FROM " & strFilterTablePrefix & "BADWORDS "

Replace with:

		strSqlb = "SELECT B_BADWORD, B_REPLACE " 
		strSqlb = strSqlb & " FROM " & strFilterTablePrefix & "BADWORDS "
		If strDBType = "mysql" Or strDBType = "oracle" then
			strSqlb = strSqlb & "ORDER BY LENGTH(B_BADWORD) DESC "
		Else
			strSqlb = strSqlb & "ORDER BY LEN(B_BADWORD) DESC "
		End If

register.asp, line 819:

		strSqlb = "SELECT B_BADWORD, B_REPLACE " 
		strSqlb = strSqlb & " FROM " & strFilterTablePrefix & "BADWORDS "

Replace with:

		strSqlb = "SELECT B_BADWORD, B_REPLACE " 
		strSqlb = strSqlb & " FROM " & strFilterTablePrefix & "BADWORDS "
		If strDBType = "mysql" Or strDBType = "oracle" then
			strSqlb = strSqlb & "ORDER BY LENGTH(B_BADWORD) DESC "
		Else
			strSqlb = strSqlb & "ORDER BY LEN(B_BADWORD) DESC "
		End If

<

Best regards,
Sir Zooro

Edited by - Davio on 26 September 2006 05:42:12

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 May 2005 :  16:17:51  Show Profile  Visit HuwR's Homepage
what exactly are you trying to fix ? also, there is no strDBType = oracle, have you modded your code<
Go to Top of Page

SirZooro
Starting Member

Poland
12 Posts

Posted - 24 May 2005 :  02:46:54  Show Profile
Yes, I use modded forum. You can remove " Or strDBType = "oracle" " and all will work fine (MySQL has LENGTH function, while SQLServer and Access have LEN). Line numbers are from your code, 3.4.05.
Issue fixed by my code is decribed at beginning of my previous post.
<

Best regards,
Sir Zooro
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 24 May 2005 :  05:03:59  Show Profile  Visit HuwR's Homepage
Thanks for the fix was a bit zonked after an 8 hour drive when I read your initial post so didn't quite follow what you were saying.<
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 March 2006 :  16:21:42  Show Profile
Anyone seeing this as a problem that should be addressed?<

Support Snitz Forums
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 08 March 2006 :  19:07:17  Show Profile  Visit muzishun's Homepage
I don't know that it is a bug. While it would take a bit more code, perhaps you could make it so people could choose to only block out the bad (parts of) words, or the entire word itself. Would require a new database field probably as well as another checkbox on the bad words config page.

Doesn't bother me either way though, to be honest. I can understand both sides preferring it a certain way. *shrug*<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 09 March 2006 :  05:08:38  Show Profile
quote:
Originally posted by Davio

Anyone seeing this as a problem that should be addressed?

Not really, no; the offending part of the word is removed either way.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 09 March 2006 :  09:47:51  Show Profile
It should be addressed. If I say block 1122 and 11 and I get a **22 in a post, then the filtering failed since it didn't block a phrase I specifically provided. Doesn't matter if the 11 was filtered or not because it failed to do what was expected. This is a simple fix and I would include it.<

KawiForums.com


Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 March 2006 :  18:41:43  Show Profile
Fixed in version 3.4.06.<

Support Snitz Forums
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07