Authored by htoooth

add encode

... ... @@ -40,7 +40,7 @@ const syncUserSession = (uid, req, res, sessionKey) => {
let encryptionUid = aes.encryptionUid(data.uid);
if (data) {
let uidCookie = `${data.profile_name}::${encryptionUid}::${data.vip_info.title}::${token}`;
let uidCookie = `${encodeURIComponent(data.profile_name)}::${encryptionUid}::${data.vip_info.title}::${token}`;
let isStudent = data.vip_info.is_student || 0;
res.cookie('_UID', uidCookie, {
... ...
... ... @@ -81,7 +81,7 @@ function getProfileName() {
return 0;
}
return user[0];
return decodeURIComponent(user[0]);
}
function getShoppingKey() {
... ...