From f6540675c99bcade72c87b0c38b486b4118a8f43 Mon Sep 17 00:00:00 2001 From: ibratabian17 Date: Sat, 21 Dec 2024 22:29:14 +0700 Subject: [PATCH] btoa -> atob --- core/route/ubiservices.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/route/ubiservices.js b/core/route/ubiservices.js index cb286c5..435fc7c 100644 --- a/core/route/ubiservices.js +++ b/core/route/ubiservices.js @@ -133,14 +133,14 @@ exports.initroute = (app, express, server) => { const userData = getUserData(profileId); const ticket = `CustomAuth${headers.authorization.split(" t=")[1]}` - if (userData && btoa(userData.password) === password) { + if (userData && atob(userData.password) === password) { console.log("[ACC] CustomAuth login: ", atob(username)); updateUser(profileId, { username: atob(username), email, password, userId: profileId, ticket: `Ubi_v1 ${ticket}` }); const sessionData = generateSessionData(profileId, username, clientIp, clientIpCountry, ticket) res.send(sessionData); return; - } else if (userData && btoa(userData.password) !== password) { - console.log("[ACC] CustomAuth login failed: ", atob(username)); + } else if (userData && atob(userData.password) !== password) { + console.log("[ACC] CustomAuth login password failed: ", atob(username)); } if (!userData) {