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

CreateJob/CreateGang don't validate grades are numbers #543

Open
solareon opened this issue Aug 18, 2024 · 2 comments
Open

CreateJob/CreateGang don't validate grades are numbers #543

solareon opened this issue Aug 18, 2024 · 2 comments
Labels
bug Something isn't working need repro This bug report needs confirmation

Comments

@solareon
Copy link
Contributor

Summary

CreateJob/CreateGang don't validate grades are numbers

Reproduction

Use bridge layer with a script designed to add jobs/gangs at run time with qb-core style grades and they are inserted into the job/gang tables with string grade keys vice numeric ones.

Expected behavior

That grades are checked to be numeric before inserting into the table

Actual behavior

The grades are inserted as is without validation

Additional context

The code in question is in server/groups.lua which just requires some additional sanity checks before inserting into the group grades table.

Unsure if the grade data returned via the bridge layer functions should translate the grades back into strings or if this can be safely ignored.

Current Version

v1.18.0

Custom Resources

n/a

@solareon solareon added bug Something isn't working need repro This bug report needs confirmation labels Aug 18, 2024
@qbox-duck qbox-duck bot added this to Issues Aug 18, 2024
@github-project-automation github-project-automation bot moved this to Todo in Issues Aug 18, 2024
@Manason
Copy link
Member

Manason commented Aug 19, 2024

The breaking change that Qbox started with was requiring grades as numbers. However, we could always add a convar that makes it so that bridge returns them as strings.

@solareon
Copy link
Contributor Author

Agree on the return bit but we do need to fix the input not being sanitized correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need repro This bug report needs confirmation
Projects
Status: Todo
Development

No branches or pull requests

2 participants