This commit is contained in:
Benjamin Toby
2025-07-28 07:23:45 +01:00
parent a429436939
commit 8ac8b8eb51
49 changed files with 475 additions and 177 deletions
@@ -27,6 +27,7 @@ function handleSocialDb(_a) {
var _b;
try {
const finalDbName = database;
const MAX_IMAGE_STRING_LENGTH = 350;
const existingSocialUserQUery = `SELECT * FROM users WHERE email = ? AND social_login='1' AND social_platform = ? `;
const existingSocialUserValues = [email, social_platform];
if (debug) {
@@ -103,6 +104,12 @@ function handleSocialDb(_a) {
password: socialHashedPassword,
};
Object.keys(payload).forEach((key) => {
if (key.match(/image/)) {
const imageString = payload[key];
if (!imageString ||
imageString.length > MAX_IMAGE_STRING_LENGTH)
return;
}
data[key] = payload[key];
});
const newUser = yield (0, addDbEntry_1.default)({