Authored by htoooth

session change

... ... @@ -3,7 +3,6 @@
const md5 = require('md5');
const uuid = require('uuid');
const _ = require('lodash');
const Fn = require('lodash/fp');
const aes = require('./aes-pwd');
const cache = global.yoho.cache;
... ... @@ -36,7 +35,7 @@ const syncUserSession = (uid, req, res, sessionKey) => {
}
return Promise.all([userService.profile(uid), cartService.goodsCount(uid)]).spread((userInfo, count) => {
let salt = Fn.pipe(Fn.take(8), Fn.join(''))(uuid.v4());
let salt = uuid.v4().substring(0, 8);
let saltedUid = uid + salt;
let saltedToken = sign.makeToken(saltedUid);
... ...