Updates
This commit is contained in:
@@ -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)({
|
||||
|
||||
Reference in New Issue
Block a user