From 04da153fe995e0aab56e9b03a7fec532eab9356b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Thu, 19 Mar 2015 14:56:21 +0100 Subject: [PATCH] [FIX] web: session requires a name to properly work For historic reasons, the session had a name (hardcoded to "instance0"), used in at least one place: the get and set cookie methods. The idea was most likely to allow multiple instances of the web client to coexist peacefully. This does not work at all at least for the last versions, and the new module system is a better way to do it anyway. However, before removing completely the prefix in cookies, we should actually check if no external code depends on it. --- addons/web/static/src/js/framework/session.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/web/static/src/js/framework/session.js b/addons/web/static/src/js/framework/session.js index 51ebc10b172..4cc9a481b4d 100644 --- a/addons/web/static/src/js/framework/session.js +++ b/addons/web/static/src/js/framework/session.js @@ -33,6 +33,11 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { this.use_cors = options.use_cors || false; this.setup(origin); this.debug = ($.deparam($.param.querystring()).debug !== undefined); + + // for historic reasons, the session requires a name to properly work + // (see the methods get_cookie and set_cookie). We should perhaps + // remove it totally (but need to make sure the cookies are properly set) + this.name = "instance0"; // TODO: session store in cookie should be optional this.qweb_mutex = new utils.Mutex(); },