diff --git a/controllers/_session.js b/controllers/_session.js index 825f5ea76..4593f8a7c 100755 --- a/controllers/_session.js +++ b/controllers/_session.js @@ -25,10 +25,12 @@ function generate(data, cb) { return session; } -function regen(session, data, cb) { +function regen(session, data, keyRegen, cb) { 'use strict'; - session.key = Utils.randomString(12); // При каждом заходе регенерируем ключ + if (keyRegen) { + session.key = Utils.randomString(12); // При каждом заходе регенерируем ключ (пока только при логине) + } session.stamp = new Date(); // При каждом заходе продлеваем действие ключа if (data) { _.assign(session.data, data); diff --git a/controllers/auth.js b/controllers/auth.js index 3d5eb1b2c..96895c11f 100755 --- a/controllers/auth.js +++ b/controllers/auth.js @@ -48,7 +48,7 @@ function login(socket, data, cb) { uaData = {b: uaParsed.ua.family, bv: uaParsed.ua.toVersionString(), os: uaParsed.os.toString(), d: uaParsed.device.family}; session.user = user; - _session.regen(session, {remember: data.remember, ua: uaData},function (err, session) { + _session.regen(session, {remember: data.remember, ua: uaData}, true, function (err, session) { _session.emitCookie(socket); cb(session, {message: "Success login", youAre: user}); }); diff --git a/package.json b/package.json index 2e1ca387f..2f28d7ec8 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pastvu", - "version": "0.8.1-dev", + "version": "0.8.1", "description": "Retrospective topography of media content", "homepage": "https://github.com/klimashkin/pastvu", "keywords": ["oldmos", "pastvu"], diff --git a/public/history.txt b/public/history.txt index 1470e5e54..b9f00e536 100644 --- a/public/history.txt +++ b/public/history.txt @@ -3,6 +3,7 @@ * (added) Футер страницы * (fixed) Роли в информации о пользователе + * (fixed) Правка сессии *** Полный список изменений: https://github.com/klimashkin/pastvu/compare/0.8.0...0.8.1 diff --git a/public/js/lib/require/plugins/require-css/css-builder.js b/public/js/lib/require/plugins/require-css/css-builder.js index 093d5b8d0..766aee7b2 100644 --- a/public/js/lib/require/plugins/require-css/css-builder.js +++ b/public/js/lib/require/plugins/require-css/css-builder.js @@ -191,7 +191,7 @@ define(['require', './normalize'], function(req, normalize) { var _cssBuffer = []; cssAPI.write = function(pluginName, moduleName, write, parse) { //external URLS don't get added (just like JS requires) - if (moduleName.substr(0, 7) == 'http://' || moduleName.substr(0, 8) == 'https://') + if (moduleName.substr(0, 7) == 'http://' || moduleName.substr(0, 8) == 'https://' || moduleName.substr(0, 2) == '//') return; var resourceName = moduleName + (!parse ? '.css' : '.less'); diff --git a/views/module/common/foot.jade b/views/module/common/foot.jade index 80c2f795c..8e796577b 100644 --- a/views/module/common/foot.jade +++ b/views/module/common/foot.jade @@ -1,6 +1,6 @@ .foot.fringe(data-bind="with: repository[M!M]") .rightSide.hide-text - .footElem.strokeAfter(data-bind="click: showAbout") About + .footElem.strokeAfter(data-bind="click: showAbout") О проекте .footElem.copyright | PastVu i.icon-white.icon-globe