Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    E-Blah Discussion    E-Blah Bugs  ›  Ban Bugs
Users Browsing Forum
No Members and 1 Guests

Ban Bugs  This thread currently has 830 views. Print
1 Pages 1 Recommend Thread
Bubzik
February 18, 2009, 9:38am Report to Moderator Report to Moderator

root
Posts: 2
Gender: Male
Posts Per Day: 0.00
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 7 hours 9 minutes
Location: Alma-Ata
Age: 33
1. Ban Group doesn't work properly with characters of non-latin alphabets (tested with Russian).
To fix it sub BanUser2 in Admin2.pl should be started as shown below:
Code
sub BanUser2 {
$URL{'g'} =~ s/%(..)/pack("C", hex($1))/eg;

2. User can be banned by "IP Address, Username or E-Mail" but it works with IP and E-Mail only.
That is because sub Ban in Load.pl checks if $banstring eq $username where $username is actually user id, not screen name that placed in BanList.txt.
So $username there should be replaced with $memberid{$username}{'sn'}.
Code
sub Ban {
...
if($ipsearch =~ /\Q$banstring/i || $banstring eq $memberid{$username}{'sn'} || $banstring eq $memberid{$username}{'email'}) { CoreLoad('BoardLock'); Banned($banlimit,$bantime); }
...
}

3. The problem - administrator can ban his own IP address. Seems like I have to say "good bye my board" if I have no FTP access. I don't think that my solution is good at all, but it is the only way I've found for now - it is to give administarator to log in anyway.
Additional sub ShowEmergencyLoginForm in Routines.pl:
Code
sub ShowEmergencyLoginForm {
$ebout .= qq~<br />
<table cellpadding="4" cellspacing="1" class="border" width="350">
 <tr> <td class="titlebg smalltext"><strong>$rtxt[35]</strong></td>
 </tr><tr>
  <td class="win">
   <form action="$surl\lv-login/p-2/" method="post">
    <table cellpadding="2" cellspacing="0" width="100%">
     <tr>
      <td class="smalltext"><strong>$rtxt[36]:</strong></td>
      <td colspan="2"><input type="text" name="username" size="20" tabindex="56" /></td>
      <td>&nbsp;</td>
     </tr><tr>
      <td class="smalltext"><strong>$rtxt[37]:</strong></td>
      <td><input type="password" name="password" size="20" tabindex="57" /></td>
      <td>&nbsp; &nbsp;<input type="hidden" name="days" value="forever" />
      <input type="hidden" name="emergency" value="yes" />
      <input type="hidden" name="redirect" value="$ENV{'QUERY_STRING'}" /><input type="submit" value="&nbsp;&nbsp;$rtxt[38]&nbsp;&nbsp;" tabindex="58" /></td>
      <td>&nbsp;</td>
     </tr>
    </table>
   </form>
  </td>
 </tr>
</table><br />
~;
}

sub error in Routines.pl ends with:
Code
...
</table>
~;      
	ShowEmergencyLoginForm();
	if($adminsloaded) { footerA(); } else { footer(); } 
	
	exit;
}

sub Ban in  Load.pl
Code
sub Ban {
	if(!$members{'Administrator',$username} && $FORM{'emergency'} ne "yes") {
	fopen(BANL,"$prefs/BanList.txt");
	while(<BANL>) {
		chomp $_;
		($banstring,$banlimit,$bantime) = split(/\|/,$_);
		$length = length($banstring);
		$ipsearch = substr($ENV{'REMOTE_ADDR'},0,$length);
		if($ipsearch =~ /\Q$banstring/i || $banstring eq $memberid{$username}{'sn'} || $banstring eq $memberid{$username}{'email'}) { CoreLoad('BoardLock'); Banned($banlimit,$bantime); }
	}
	fclose(BANL);
	}
}


That is all for now. Sorry if the bugs listed above are not the bugs at all but just my seek imagination.


#!/usr/bin/perl
Logged
Site Site Private Message Private message ICQ ICQ Skype Skype
Gaahl
June 3, 2009, 8:17am Report to Moderator Report to Moderator

Lurking...
E-Blah Member
Posts: 20
Posts Per Day: 0.02
Time Online: 1 days 1 hours 29 minutes
+1 for #2, banning by username. I used your suggestion and it worked. Thx
Logged Offline
Private Message Private message Reply: 1 - 4
evixion
June 9, 2009, 6:42am Report to Moderator Report to Moderator

Web Developer for Hire
Forum Moderation
Posts: 226
Gender: Male
Posts Per Day: 0.19
Reputation: 100.00%
Reputation Score: +6 / -0
Time Online: 7 days 1 hours 34 minutes
Location: Elizabethton, Tennessee
Age: 26
You should write this as a mod


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 2 - 4
Justin
June 19, 2009, 8:54pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,196
Gender: Male
Posts Per Day: 4.37
Reputation: 93.25%
Reputation Score: +304 / -22
Time Online: 37 days 19 hours 48 minutes
Location: Tallassee, AL
Age: 25
Quoted from Gaahl
+1 for #2, banning by username. I used your suggestion and it worked. Thx


Whenever I get around to releasing a new version of E-Blah, this will be incorporated into it.  


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 3 - 4
Gaahl
June 22, 2009, 4:38am Report to Moderator Report to Moderator

Lurking...
E-Blah Member
Posts: 20
Posts Per Day: 0.02
Time Online: 1 days 1 hours 29 minutes
One more thing: I think you should also code it to automatically display the "Banned" thingie under user's avatar when viewing posts", instead of manually writing this for every banned user (as far as I know, this is how is done in 10.3.6).
Logged Offline
Private Message Private message Reply: 4 - 4
1 Pages 1 Recommend Thread
Print

E-Blah Community    E-Blah Discussion    E-Blah Bugs  ›  Ban Bugs

Thread Tags
user,  ban,  eq,  ip,  i,  -,  bugs