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

"connect" console command does not validate company ID properly #2849

Closed
DorpsGek opened this issue Apr 19, 2009 · 1 comment
Closed

"connect" console command does not validate company ID properly #2849

DorpsGek opened this issue Apr 19, 2009 · 1 comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

bilbo opened the ticket and wrote:

While working on one patch of my own (reconnect console command) I noticed a flaw in the "connect" console command (ConNetworkConnect in console_cmds.cpp) - well, because I found out my patch suffered from the same flaw too :)

The "connect" command allows you to specify company you want to join, however, it uses IsValidCompanyID() function to validate the ID given as parameter. But this function not only validates that the company ID lies withing reasonable bounds (0..MAX_COMPANIES-1), it also tries to validate the ID by examining current company list. This is done before connecting to server, so this uses list from whatever game that is currently loaded (which mean you can join only first company on server using that command if you do it from the intro screen for example).

Reported version: trunk
Operating system: All


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

Rubidium closed the ticket.

Reason for closing: Fixed

In r16096


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

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant