-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
I have a model called "patients" which is using the default find blueprint in sails (it's controller definition is just module.exports = {};). I have a sinking suspicion it may have to do with node-mysql not actually supporting prepared statements (https://github.com/felixge/node-mysql#escaping-query-values).
I'm able to recreate the issue on any string field by passing in \\\" in "startsWith" as a where criteria. E.g. this:
http://localhost:3000/v1/patients?where={"firstName":{"startsWith":"\\\" OR 1=1; -- "}}
Returns all records in the patients table. Scary.
I have:
"sails": "^0.11.2",
"sails-mysql": "^0.11.0"
In my package.json. Has anyone else experienced anything similar?
noway
Metadata
Metadata
Assignees
Labels
No labels