ID:2425511
 
BYOND Version:512
Operating System:Windows 8
Web Browser:Chrome 71.0.3578.98
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:

I've had a case where a user was not able to connect (ID:2416010), that I was able to track down to a single game level stickyban matching them, but not saving the match in the stickyban's keys list, nor returning the stickyban in ..() of world/Isbanned().

Normal connection trace:
[2019-01-31 22:27:53.344] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Start
[2019-01-31 22:27:53.344] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Admin mode activated
[2019-01-31 22:27:53.344] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Stickyban checking
[2019-01-31 22:27:53.344] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Stickyban = `null`
[2019-01-31 22:27:53.344] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Organic End. Returning null
[2019-01-31 22:27:54.346] CONNECTION: /client/New(): Start
[2019-01-31 22:27:54.346] CONNECTION: /client/New(): deadmin
[2019-01-31 22:27:54.346] CONNECTION: Login: MrStonedOne from -snip---snip- || BYOND v512.1463
[2019-01-31 22:27:54.346] CONNECTION: /client/New(): player_details check
[2019-01-31 22:27:54.346] CONNECTION: /client/New(): ..() start
[2019-01-31 22:27:54.347] CONNECTION: Mob Login: MrStonedOne/(MrStonedOne) was assigned to a /mob/dead/new_player
[2019-01-31 22:27:54.352] CONNECTION: /client/New(): ..() end
[2019-01-31 22:28:42.948] CONNECTION: /client/Del(): Start
[2019-01-31 22:28:42.972] CONNECTION: /client/Del(): Stacktrace:
- gib stack trace()
- MrStonedOne (/client): Del()
-
[2019-01-31 22:28:42.972] CONNECTION: Logout: MrStonedOne/(MrStonedOne)


Bugged stickyban connection trace:

[2019-01-31 22:38:26.370] CONNECTION: /world/IsBanned(Higashikata Josuke, -snip-, -snip-, seeker, 0): Start
[2019-01-31 22:38:26.370] CONNECTION: /world/IsBanned(Higashikata Josuke, -snip-, -snip-, seeker, 0): Stickyban checking
[2019-01-31 22:38:26.370] CONNECTION: /world/IsBanned(Higashikata Josuke, -snip-, -snip-, seeker, 0): Stickyban = `null`
[2019-01-31 22:38:26.370] CONNECTION: /world/IsBanned(Higashikata Josuke, -snip-, -snip-, seeker, 0): Organic End. Returning null
[2019-01-31 22:38:27.223] CONNECTION: /world/IsBanned(Higashikata Josuke, -snip-, -snip-, seeker, 0): Start
[2019-01-31 22:38:27.223] CONNECTION: /world/IsBanned(Higashikata Josuke, -snip-, -snip-, seeker, 0): Stickyban checking
[2019-01-31 22:38:27.223] CONNECTION: /world/IsBanned(Higashikata Josuke, -snip-, -snip-, seeker, 0): Stickyban = `null`
[2019-01-31 22:38:27.223] CONNECTION: /world/IsBanned(Higashikata Josuke, -snip-, -snip-, seeker, 0): Organic End. Returning null


The key issue is that calling ..() in IsBanned() should return the stickyban they matched (as long as its a game level stickyban and not a global one).

https://secure.byond.com/docs/ref/info.html#/world/proc/ IsBanned said:
Returns:
True value if user is banned from this world. This may be a list, in which case special meaning is attributed to certain list elements as described below.
[...] Of course, you can also override IsBanned() and insert these values directly into the list that is returned.

It is not doing this, nor is it saving the users key,ip,cid to the stickyban's list of matched fields inside documents/byond/cfg/ban.txt (and i confirmed it was not getting saved in the game cfg or the program files cfg folder.)

I was able to find logs of stickyban matches happening on our game server, so it's not all the time this bug triggers.

I know it's matching a stickyban because it stops happening if i disable them. I know what exact stickyban by having them connect while I disabled half of the bans until we found the exact ban.

The triggering stickyban line has been sent to lummox. I both confirmed it happens if only that stickyban is present, and that it does not happen if all other stickybans but that ban are present.

This was confirmed on 512.1463.
Based on the info you sent me it's definitely matching the guy I suspected it might be, who appeared a lot in your early ban files. But I'm still not clear on why, because when I checked their login data there was nothing to link them that would suggest a hub-based sticky check triggered.

What I still can't figure out is if the ban is triggering at the hub end or the server end. It doesn't make sense that the hub would return a ban here, especially because the key should definitely be added to the local sticky ban info. However, the fact that IsBanned() is called twice is very interesting because that would happen in the event of an extended sticky ban.

A data point I'm missing is what this looks like for a non-admin login. Is IsBanned() called twice there too?

It'd also be nice to see your current IsBanned() code.
The admin check just sets a variable to true that is only checked further down the line at rejection time, to instead send a notice to all admins that an admin was allowed to bypass a ban match.

IsBanned.dm: https://gist.github.com/MrStonedOne/ 7274721a4df7fc7ba94cdc9582e9ad8a

Normal Allowed Non-Admin:
[2019-02-01 22:10:57.596] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Start
[2019-02-01 22:10:57.596] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Stickyban checking
[2019-02-01 22:10:57.596] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Stickyban = `null`
[2019-02-01 22:10:57.597] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Organic End. Returning null
[2019-02-01 22:11:12.296] CONNECTION: /client/New(): Start
[2019-02-01 22:11:12.306] CONNECTION: Login: MrStonedOne from -snip---snip- || BYOND v512.1463
[2019-02-01 22:11:12.306] CONNECTION: /client/New(): player_details check
[2019-02-01 22:11:12.306] CONNECTION: /client/New(): ..() start
[2019-02-01 22:11:12.306] CONNECTION: Mob Login: MrStonedOne/(MrStonedOne) was assigned to a /mob/dead/new_player
[2019-02-01 22:11:12.341] CONNECTION: /client/New(): ..() end
[2019-02-01 22:13:43.394] CONNECTION: /client/Del(): Start
[2019-02-01 22:13:43.416] CONNECTION: /client/Del(): Stacktrace:
- gib stack trace()
- MrStonedOne (/client): Del()
-
[2019-02-01 22:13:43.416] CONNECTION: Logout: MrStonedOne/(MrStonedOne)


Game Sticky Banned Non-Admin:
[2019-02-01 22:24:40.258] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Start
[2019-02-01 22:24:40.258] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Stickyban checking
[2019-02-01 22:24:40.258] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Stickyban = `{"reason":"test","message":"test","ckey":"mrstonedone","type":"sticky","IP":"-snip-","computer_id":"-snip-"}`
[2019-02-01 22:24:40.259] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Stickyban found
[2019-02-01 22:24:40.259] CONNECTION: Failed Login: MrStonedOne -snip- -snip- - StickyBanned test Target Username: mrstonedone Placed by
[2019-02-01 22:24:40.259] CONNECTION: /world/IsBanned(MrStonedOne, -snip-, -snip-, seeker, 0): Organic End. Returning {"reason":"Stickyban","desc":"\nReason:(StickyBan) You, or another user of this computer or connection (mrstonedone) is banned from playing here. The ban reason is:\ntest\nThis ban was applied by \nThis is a BanEvasion Detection System ban, if you think this ban is a mistake, please wait EXACTLY 6 seconds, then try again before filing an appeal.\n"}


and for completeness:

Global Sticky Banned Non-Admin:
(This space intentionally left blank)



Bumping as we have a user reporting the same issue on 513.1528. No active bans and no record of being sticky banned, just an access denied error. Same as http://www.byond.com/forum/post/2416010