mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-10-09 21:14:00 +00:00
Fix SQL Injection Vulnerabilities (#134)
* avoid sql injections * linter * fix test using random sid * add some test cases * remove tests that don't use the new validation * add test * linter * fix tests * add test --------- Co-authored-by: Guilherme Rauen <g.rauen@cognigy.com>
This commit is contained in:
co-authored by
Guilherme Rauen
parent
27cb7c471a
commit
789a0ba3ff
@@ -1,3 +1,9 @@
|
||||
class BadRequestError extends Error {
|
||||
constructor(msg) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
class DbError extends Error {
|
||||
constructor(msg) {
|
||||
super(msg);
|
||||
@@ -23,6 +29,7 @@ class DbErrorForbidden extends DbError {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
BadRequestError,
|
||||
DbError,
|
||||
DbErrorBadRequest,
|
||||
DbErrorUnprocessableRequest,
|
||||
|
||||
Reference in New Issue
Block a user