badmfck-api-server 2.8.9 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -236,7 +236,7 @@ class MysqlAdapter {
|
|
236
236
|
}
|
237
237
|
}
|
238
238
|
catch (e) {
|
239
|
-
(0, LogService_1.logCrit)("MysqlAdapter", `Error when executing query: ${e
|
239
|
+
(0, LogService_1.logCrit)("MysqlAdapter", `Error when executing query: ${query}`, e);
|
240
240
|
const error = {
|
241
241
|
code: "EXEC_ERROR",
|
242
242
|
errno: 100002,
|
@@ -341,7 +341,9 @@ class MysqlAdapter {
|
|
341
341
|
if (value === null || value === undefined)
|
342
342
|
return "NULL";
|
343
343
|
if (!system && typeof value === "string")
|
344
|
-
value = value.replaceAll('"', '\\"');
|
344
|
+
value = '"' + value.replaceAll('"', '\\"') + '"';
|
345
|
+
if (typeof value === "boolean")
|
346
|
+
value = value ? 1 : 0;
|
345
347
|
field.__parsedValue = value;
|
346
348
|
return value;
|
347
349
|
}
|