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

AuthController doesn't seem to validate that input is a string #133

Open
cxcorp opened this issue Feb 6, 2023 · 1 comment
Open

AuthController doesn't seem to validate that input is a string #133

cxcorp opened this issue Feb 6, 2023 · 1 comment
Labels
bug Bug

Comments

@cxcorp
Copy link
Contributor

cxcorp commented Feb 6, 2023

if (!req.body.serviceIdentifier || !req.body.username || !req.body.password) {

Try: GET /?serviceIdentifier=7e100baf-f4b1-4956-9b65-231bc29fe079&serviceIdentifier=7e100baf-f4b1-4956-9b65-231bc29fe079

select * from serviceswhereservice_identifier = '7e100baf-f4b1-4956-9b65-231bc29fe079', '7e100baf-f4b1-4956-9b65-231bc29fe079' limit 1 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '7e100baf-f4b1-4956-9b65-231bc29fe079' limit 1' at line 1

Sentry issue: https://tko-aly-ry.sentry.io/issues/3918528895/

Should check typeof req.body.serviceIdentifier === 'string' and for the other fields as well. Probably in all other controllers and methods too.

@cxcorp cxcorp added the bug Bug label Feb 6, 2023
@MergHQ
Copy link
Contributor

MergHQ commented Feb 6, 2023

We should just use Zod for example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants