Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
Added some sanity check sql injection tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dberesford committed Feb 19, 2018
1 parent 0fa6a5d commit ea37ff7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/integration/userOps.test.js
Expand Up @@ -814,4 +814,22 @@ lab.experiment('UserOps structure', () => {
done()
})
})

lab.test('Search sql injection org_id sanity check', (done) => {
udaru.users.search({ query: 'Charlie', organizationId: 'WONKA||org_id<>-1'}, (err, data, total) => {
expect(err).to.not.exist()
expect(total).to.equal(0)
expect(data.length).to.equal(0)

done()
})
})

lab.test('Search sql injection query sanity check', (done) => {
udaru.users.search({ query: 'Charlie\');drop database authorization;', organizationId: 'WONKA'}, (err, data, total) => {
expect(err).to.exist()
done()
})
})

})

0 comments on commit ea37ff7

Please sign in to comment.