Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate bans can be added #5308

Closed
DorpsGek opened this issue Sep 24, 2012 · 4 comments
Closed

Duplicate bans can be added #5308

DorpsGek opened this issue Sep 24, 2012 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

xOR opened the ticket and wrote:

A ban can be added to the internal ban list of OpenTTD although it exists already, causing duplicate ban entries on the ban list. If someone else does an unban and doesn't notice it's a duplicated entry the ban will still be effective, as the second entry remains:

banlist
Banlist:

  1. 123.123.123.123

ban 123.123.123.123
Client not online, address added to banlist
banlist
Banlist:

  1. 123.123.123.123
  2. 123.123.123.123

unban 123.123.123.123
IP unbanned.
banlist
Banlist:

  1. 123.123.123.123

Reported version: 1.2.2
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5308
@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 9, 2012

alechz wrote:

Fix: before adding client ip to server-side banlist, check for an existing entry. This is being done by iterating over and comparing on _network_ban_list.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5308#comment11573

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 9, 2012

alechz wrote:

first image: unfixed version
second image: fixed version

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5308#comment11574

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 9, 2012

frosch wrote:

Thanks for the diff.

I fixed the iterator usage and the memory leak with the strdup.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5308#comment11575

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 9, 2012

frosch closed the ticket.

Reason for closing: Fixed

in r24580


This comment was imported from FlySpray: https://bugs.openttd.org/task/5308

@DorpsGek DorpsGek closed this as completed Oct 9, 2012
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant