Page Index Toggle Pages: 1
Topic Tools
Hot Topic (More than 10 Replies) Environment String Blocking and Attachment Names (Read 2,669 times)
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,396
Location: Earth

YaBB 2.6.1
Environment String Blocking and Attachment Names
Aug 22nd, 2012 at 1:19am
Post Tools
Another thing we should look at is the 'secondary censor list' in Guardian. If that has different words in it, an attachment with Guardian 'bad words' can trigger IP banning of people clicking on that file - assuming Guardian has been set up to do that.)
« Last Edit: Aug 22nd, 2012 at 3:57pm by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Environmental Variables & String
Reply #1 - Aug 22nd, 2012 at 1:29am
Post Tools
How do you want to handle it? You can either block users from uploading files which contain words in 'Environment String Blocking' in the first place - or just bypass it banning members when clicked on...
  
Back to top
 
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Environmental Variables & String
Reply #2 - Aug 22nd, 2012 at 1:41am
Post Tools
To bypass it and allow attachments to be viewed with blocked words, in Sources/Guardian.pl find:

Code (Perl)
Select All
    if ($string_on) { 


And replace with:

Code (Perl)
Select All
    if ($string_on && $action ne "downloadfile") { 

« Last Edit: Aug 22nd, 2012 at 1:45am by Derek Barnstorm »  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,396
Location: Earth

YaBB 2.6.1
Re: Environmental Variables & String
Reply #3 - Aug 22nd, 2012 at 1:47am
Post Tools
Because of the way I have my own forums set up - with no censored word list at all but still using the Guardian environmental string to block things - I think I'll look at blocking them from being uploaded rather than banning the alleged perp. (They might be innocent.)  We could also look at actually using the Guardian list as a true secondary censor list as well as a blocked environment string list. That would allow people like me who don't want censorship in posts still block objectionable display names, email addresses, and attachment names.

Haven't quite thought this through yet. As you can tell.  Wink
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Environmental Variables & String
Reply #4 - Aug 22nd, 2012 at 2:17am
Post Tools
Dandello wrote on Aug 22nd, 2012 at 1:47am:
I think I'll look at blocking them from being uploaded rather than banning the alleged perp

Something like this should do the trick...

In Sources/Post.pl and Sources/ModifyMessage.pl find:

Code (Perl)
Select All
                    &fatal_error("tsc_alert");
                }
            } 


And add after:

Code (Perl)
Select All
            if ($use_guardian && $string_on) {
                @bannedstrings = split(/\|/, $banned_strings);
                foreach (@bannedstrings) {
                    chomp $_;
                    if ($fixname =~ m/$_/i) { &fatal_error("attach_name_blocked","($_)"); }
                }
            } 


Then in Languages/English/Error.lng find:

Code (Perl)
Select All
'no_siglinks_allowed'		=> "Sorry, you are not allowed to create a signature containing active links to websites or images before you have posted $minlinksig normal messages.", 


And add after:

Code (Perl)
Select All
'attach_name_blocked'		=> "Your attachment name contains a word which is not allowed on this forum.", 

« Last Edit: Aug 22nd, 2012 at 1:24pm by Derek Barnstorm »  
Back to top
 
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Environmental Variables & String
Reply #5 - Aug 22nd, 2012 at 3:34am
Post Tools
Should probably stop it from banning users when attachments with blocked words are attempted being viewed anyway - in case the Environment String Blocking is turned off and turned back on again.

In Sources/Guardian.pl find:

Code (Perl)
Select All
                if ($use_htaccess && $string_htaccess && !$iamadmin && !$iamgmod) { 


And replace with:

Code (Perl)
Select All
                if ($use_htaccess && $string_htaccess && !$iamadmin && !$iamgmod && $action ne "downloadfile") { 

« Last Edit: Aug 22nd, 2012 at 3:37am by Derek Barnstorm »  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,396
Location: Earth

YaBB 2.6.1
Re: Environmental Variables & String
Reply #6 - Aug 22nd, 2012 at 4:53am
Post Tools
You're a genius.  Grin
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Environmental Variables & String
Reply #7 - Aug 22nd, 2012 at 1:28pm
Post Tools
Ha ha! You obviously don't know me that well. Cheesy

Made a slight adjustment to Post #4 so that it doesn't get triggered if The Guardian is turned off.
« Last Edit: Aug 22nd, 2012 at 3:59pm by Derek Barnstorm »  
Back to top
 
IP Logged
 
xnoddyx
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline



Posts: 1,591
Location: UK:Scotland/livingston

None
Re: Environmental Variables & String
Reply #8 - Aug 22nd, 2012 at 3:40pm
Post Tools
Derek Barnstorm wrote on Aug 22nd, 2012 at 1:44pm:
Maybe this thread should be split from Post #5 and title it something like "Environment String Blocking and Attachment Names" - it will make it easier for other devs and users to find if the issue comes up again in the future?

that sounds good to me as it is a separate item + remove this when split Smiley
  

YaBB install help video
1. what yabb forum are you running and the url
2. describe in as much detail as you can what happens and also post screenshots if you can
3. please be patient we live in different time zones and have other commitments but we will help you
as bill and ted say (Be excellent to each other)
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,396
Location: Earth

YaBB 2.6.1
Re: Environmental Variables & String
Reply #9 - Aug 22nd, 2012 at 3:56pm
Post Tools
This Topic was moved here from YaBB 2 - Bugs [Need Verification] [move by] Dandello.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,396
Location: Earth

YaBB 2.6.1
Re: Environment String Blocking and Attachment Names
Reply #10 - Nov 6th, 2012 at 9:31pm
Post Tools
This Topic was moved here from YaBB 2 - Bugs [Need Verification] [move by] Dandello.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top