fuzziqersoftware / newserv

Phantasy Star Online game server, proxy, and reverse-engineering tools
MIT License
159 stars 35 forks source link

[newserv] [Feature Request] Setting to disallow login with the same account twice or more #511

Open nolrinale opened 3 months ago

nolrinale commented 3 months ago

Currently is possible to login in the game twice with 2 clients, you can have the same copy of your current character playing with you in your party sharing/dropping items, I think this is a vector for very dangerous situations in-game including item duping, quest flag malfunction, cmode/bmode conflicts or player data corruption.

I would like to have a setting via config.json that disallows this behavior entirely because im not sure if its useful for older versions such as GC or DC

fuzziqersoftware commented 3 months ago

This is not actually dangerous; the server has only one copy of the player data in memory and it is shared between the two clients. This means that items cannot be duplicated, for example, since if both players attempt to drop the same item, the second one will already be missing the item when they try to drop it and will be disconnected instead. In the case of challenge/battle records, one of the clients will "win" and update the records in the player data, and the other update will simply be lost. Since records are always updated in their entirety, there's no way to get into an inconsistent state.

I will still fix this, since it leads to unexpected/unintuitive behaviors, but it's not a critical or dangerous issue.

nolrinale commented 3 months ago

I must be very old school but what is the problem with showing a simple "This account/SNAK is already in use" error box?

I think is something that would benefit you as you wont have to manually keep track of every single client-server interaction no matter how small/big it is to avoid unintended effects in-game. Which in turn is less bugs for you to fix.

But you do you it's your project Feel free to close this one as invalid if you wish

fuzziqersoftware commented 3 months ago

Please re-read my comment. I said I would fix it, and I will. It's not a high priority for me right now, but I will get to it at some point.