smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.65k stars 2.71k forks source link

Room ban evasion #568

Closed twstagg closed 10 years ago

twstagg commented 10 years ago

If you are room banned, you can join in and do /nick NameYouAreBannedUnder and log in as the name that you originally got room banned from.

Example:

I'm room banned from this room, I cannot join.

screenshot 2014-01-17 13 07 45

I log in to a different account.

screenshot 2014-01-17 13 09 05

I join as the different account.

screenshot 2014-01-17 13 10 59

I do /nick BannedAccount.

screenshot 2014-01-17 13 11 46

And I'm in like that.

screenshot 2014-01-17 13 12 32

Not sure why this happens, but it does. :P

Zarel commented 10 years ago

@Joimer You implemented roomban, right?

Joimer commented 10 years ago

Yes, but theres an IP check here https://github.com/Zarel/Pokemon-Showdown/blob/master/users.js#L1047 that used to work before. I can make tests tomorrow to see what's happening.

Zarel commented 10 years ago

I thought this.ips was an array? That might be the issue.

Joimer commented 10 years ago

Could be (Edited because wrong)

Zarel commented 10 years ago

You're using the same values for key/value. :|

Try for (var ip in ['a', 'b', 'c']) console.log(ip);

Joimer commented 10 years ago

Ugh forget that, I will never drink again. I mean: this.ips = {} it's always been an object, isn't it?

Zarel commented 10 years ago

Hm, you're right; that's not the problem.

Zarel commented 10 years ago

It's possible you just switched IPs, in which case this is a minorer issue.