jean
08/06/2021, 7:24 AMString.escapeIfNeeded
method, is it enough to protect my database from injection and other possible attacks? I also found apache commons-text
library that has StringEscapeUtils
but it seems a bit less practical since there’s an escape method for java, one for ecmascript, etc…jean
08/06/2021, 7:28 AMescapeIfNeeded()
is internal anyways, do you have any suggestions for me regarding what I should use to make sure a string is safe?spand
08/06/2021, 7:36 AMspand
08/06/2021, 7:38 AMVampire
08/06/2021, 7:38 AMjean
08/06/2021, 7:50 AMgetCollection(USER, Document::class.java)
.find(
and(
eq("email", email.value),
eq("password", password.value)
)
)
.toList()
.mongoDocumentToMap()
.firstOrNull()
?.toUser()
first of all it’s not even SQL but NoSQL with mongoDB. There is a mongo-sanitize
js library for Node.js for example, but I haven’t find something specific for java/kotlinVampire
08/06/2021, 12:46 PM