From 55cf3b4b02bdc673048820e39172d406fd72b134 Mon Sep 17 00:00:00 2001 From: Diego Magdaleno Date: Sun, 23 May 2021 12:44:02 -0500 Subject: [PATCH] Update: Update fosscord-server-util to latest and fix issues with NULL and undefined --- package-lock.json | Bin 770357 -> 770357 bytes package.json | 2 +- src/routes/auth/register.ts | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc6731a8ffc645a05ce2634204f5f7673206b070..21c011ad5303db34695b6f2d9479ac16897fec22 100644 GIT binary patch delta 300 zcmdnmq`$REf5Hc5V?Be7pLcjqpFe}iaJpR=o7(h8eauRs?oOeG5k8KA-jz8;=4N3@ zrrGYU*^!=kSq6mx*;V>3midlh!2zDZzMkPpk*WD+L7r)jL1B5R>1J*zMXBM=+Tq^j zp?=8)?nT;OZe9gtzG=a!{!tIF*6Xe05R+K1-@*#Hgs{x sbjJdAnQ46N?3)+(E@zxBv5!Nh{a_Cp5VHd@2M}`tG1vBkJ=`TG05AG$fdBvi delta 307 zcmdnmq`$REf5Hc5BRz|apLcjO8cjE>W;K{@*Ttp=5}R%~ja4BeyWGsn%vC$0!Z%Ml zCDSP=FexI>#4^w&+toNfJ3Yd*(6z`QG^;8oE3sTZ)zwtnKQq-;ztS?zvdkhZ!znN_ zGTSfQttcg^#K<_%DJaM_u(U9Ax?>EJ!sHJp*_#*mwlDBy1Y#y2W(HywAZFdZz?Uu8 rhK}wz$j7C;d4cb8#_1CKIAq!n_OJmlI}mdKF((jnZ9mw e.g. protection against GMail Trick - let adjusted_email: string | undefined = adjustEmail(email); + let adjusted_email: string | null = adjustEmail(email); // adjusted_password will be the hash of the password let adjusted_password: string = ""; @@ -181,7 +181,7 @@ router.post( mobile: false, premium: false, premium_type: 0, - phone: undefined, + phone: null, mfa_enabled: false, verified: false, presence: { @@ -253,7 +253,7 @@ router.post( } ); -export function adjustEmail(email: string): string | undefined { +export function adjustEmail(email: string): string | null { // body parser already checked if it is a valid email const parts = email.match(EMAIL_REGEX); // @ts-ignore