From 59a1a9cd36242e17a1bf5946fbf2f721d5a253f0 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 11 Jan 2018 21:44:00 +0200 Subject: [PATCH] Fix #1958: Remove session token hash conversion --- src/client.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/client.js b/src/client.js index e3185a62..53b1403f 100644 --- a/src/client.js +++ b/src/client.js @@ -94,27 +94,6 @@ function Client(manager, name, config) { if (typeof client.config.sessions !== "object") { client.config.sessions = {}; - } else { - // TODO: This is just for backwards compatibility. Remove in v3.0.0 - const newSessions = {}; - let changed = false; - - _.forOwn(client.config.sessions, (session, key) => { - if (key.length !== 128) { - key = client.calculateTokenHash(key); - changed = true; - } - - newSessions[key] = session; - }); - - if (changed) { - log.info(`User ${colors.bold(client.name)} has been updated with new security requirements for tokens.`); - - delete client.config.token; - client.config.sessions = newSessions; - client.save(); - } } _.forOwn(client.config.sessions, (session) => {