PDA

View Full Version : [FIXED][3] Another Bug in 2.x.x.. You can get it easily fixed.


Logician
Thu 9th Jan '03, 5:25pm
Hey there,

I'm really surprised this hasn't been discovered before since it's an important bug. It should have already been exploited by malicious users too but since the bug still exists in v.2.2.9, I assume, I'm the first to report:

All 2.x.x versions have a bug in register.php and member.php which allows any user to easily bypass banned emails. For example if you banned "yahoo.com" domain in banning options, by exploiting this bug member can still register using a "yahoo.com" address. One of my users did and this is how I discovered the bug.

Bypassing is easy: [EDIT: On the second thought, I removed this section. Devs can easily understand the problem when checking the code and the fix and rest do not need to understand how it's passed. Fix is provided in my post and it should be enough.. Logician]

The fix is easy either:

In register.php, find: if ($enablebanning and $banemail!="" ) {

BEFORE that add:
// Bug Fix: Can pass banned address bug
$email = trim($email);
// Bug Fix: Can pass banned address bug



In member.php find: if (!$allowkeepbannedemail or $bbuserinfo[email]!=$email) {

AFTER that add:
// Bug Fix: Can pass banned address bug
$email = trim($email);
// Bug Fix: Can pass banned address bug


IMO this is an important bug so I strongly suggest applying the fix especially if you have banned emails or mail domains.

Speaking of the important bugs, I want to stress the importance of closing this bug forum to unlicenced users' view once more which I suggested here (http://www.vbulletin.com/forum/showthread.php?threadid=61434). Allowing everybody to read posts like these really endangers the security of our boards. The posts like these should be really for only board admins' eye, not for a pissed off/banned member who is sneaking around this forum to catch a bug which he can exploit to get his revenge from the Admin.. My 2 cents again..

Regards,
Logician

Ps. My title choice is intentional. I didn't want to get attention to this thread with a title like "Banned users can bypass the ban" for obvious reasons.

DVD Plaza
Thu 9th Jan '03, 8:54pm
Bloody heck - so that's why I keep getting hotmail/etc accounts registering, even though when I try it I get rejected.

Problem must be more widely known, or accidentally done, than it seems...

Steve Machol
Fri 10th Jan '03, 12:23am
Moved to Bugs forum for a developer to check.

Alwaysmefirst
Thu 16th Jan '03, 5:49pm
Originally posted by DVD Plaza
Problem must be more widely known, or accidentally done, than it seems...
I think so, it happened on my board too...

97cobracpe
Tue 4th Mar '03, 7:59pm
In register.php, find: if ($enablebanning and $banemail!="" ) {

I searched for that and found nothing.

I'm running 2.2.9

97cobracpe
Tue 4th Mar '03, 8:06pm
Nevermind. You had a minor typo. :)

There is no space between "" and ).

All fixed now.

Kier
Fri 7th Mar '03, 6:08am
In register.php, find: if ($enablebanning and $banemail!="" ) {
BEFORE that add:
// Bug Fix: Can pass banned address bug
$email = trim($email);
// Bug Fix: Can pass banned address bug


In member.php find: if (!$allowkeepbannedemail or $bbuserinfo[email]!=$email) {
AFTER that add:
// Bug Fix: Can pass banned address bug
$email = trim($email);
// Bug Fix: Can pass banned address bug
Sorry, just quoting your post to see if I've managed to fix that CODE__SNIPPET bug thingy...

Kier
Fri 7th Mar '03, 6:09am
Sorry, just quoting your post to see if I've managed to fix that CODE__SNIPPET bug thingy...
And I have :)

Logician
Fri 7th Mar '03, 10:27am
well done! ;)