Skip to content

Conversation

Fernando-A-Rocha
Copy link
Contributor

@Fernando-A-Rocha Fernando-A-Rocha commented Feb 17, 2023

Adds safety checks to arguments of getCountryName( country ) and getPlayerCountry ( player ).

Also fixes admin2 calling getCountryName(aPlayers[player].country) without checking if the country code is set. This would always trigger an error when playing on LAN as ip2c can't get any country from your local ip.

@Fernando-A-Rocha
Copy link
Contributor Author

Fernando-A-Rocha commented Feb 20, 2023

I noticed that on a new server with default resources, ip2c doesn't have fetchRemote access so I added the aclrequest to meta.xml

e

Was this the right thing to do? Is there a way to allow it by default?

@Fernando-A-Rocha Fernando-A-Rocha changed the title ip2c: Add argument checks to ip2c exported functions ip2c: fixes (arguments and fetchRemote permission) Feb 20, 2023
@brenodanyel
Copy link

I noticed that on a new server with default resources, ip2c doesn't have fetchRemote access so I added the aclrequest to meta.xml

e

Was this the right thing to do? Is there a way to allow it by default?

Maybe it's better to send a PR on mtasa-blue adding a simple <object name="resource.ip2c"/> under the "Admin" group to enable it by default, so that server owners don't have to worry about running aclrequest allow ... manually?

@Fernando-A-Rocha
Copy link
Contributor Author

I noticed that on a new server with default resources, ip2c doesn't have fetchRemote access so I added the aclrequest to meta.xml
e
Was this the right thing to do? Is there a way to allow it by default?

Maybe it's better to send a PR on mtasa-blue adding a simple <object name="resource.ip2c"/> under the "Admin" group to enable it by default, so that server owners don't have to worry about running aclrequest allow ... manually?

I was looking for this. Thank you, this seems the right thing to do. I'll revert my latest aclrequest commit and do that instead 👍

@Fernando-A-Rocha Fernando-A-Rocha changed the title ip2c: fixes (arguments and fetchRemote permission) ip2c: Add safety checks to exported function arguments Feb 20, 2023
@Dutchman101 Dutchman101 merged commit 495d158 into multitheftauto:master Feb 25, 2023
@patrikjuvonen patrikjuvonen added this to the 1.6.0 milestone Apr 7, 2023
@Fernando-A-Rocha Fernando-A-Rocha deleted the fix-ip2c branch June 19, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants