implemented sync hash check recovery process

This commit is contained in:
zadam
2019-12-18 22:58:30 +01:00
parent 77311954a1
commit d47403c0e7
6 changed files with 72 additions and 21 deletions

View File

@@ -53,6 +53,10 @@ function sanitizeSql(str) {
return str.replace(/'/g, "''");
}
function sanitizeSqlIdentifier(str) {
return str.replace(/[A-Za-z0-9_]/g, "");
}
function prepareSqlForLike(prefix, str, suffix) {
const value = str
.replace(/\\/g, "\\\\")
@@ -174,6 +178,7 @@ module.exports = {
hash,
isEmptyOrWhitespace,
sanitizeSql,
sanitizeSqlIdentifier,
prepareSqlForLike,
stopWatch,
escapeHtml,