From 0311719de2bf521750b48df7cc8c03d917648881 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Tue, 22 Dec 2015 13:11:47 -0500 Subject: [PATCH] Selfcheck Cookie Path Change base.xul/base.js to support a "cookie path" option to limit what paths will use the login cookie, then tell the selfcheck interface to use it. Signed-off-by: Thomas Berezansky Signed-off-by: Chris Sharp --- Open-ILS/src/templates/base.tt2 | 2 +- Open-ILS/src/templates/circ/selfcheck/main.tt2 | 2 +- Open-ILS/web/js/ui/base.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/templates/base.tt2 b/Open-ILS/src/templates/base.tt2 index a6f4b8c8bb..a688351233 100644 --- a/Open-ILS/src/templates/base.tt2 +++ b/Open-ILS/src/templates/base.tt2 @@ -10,7 +10,7 @@ - + diff --git a/Open-ILS/web/js/ui/base.js b/Open-ILS/web/js/ui/base.js index c6ed445bfa..aefd735143 100644 --- a/Open-ILS/web/js/ui/base.js +++ b/Open-ILS/web/js/ui/base.js @@ -47,7 +47,7 @@ function oilsSetupUser() { if(!authtoken) { - dojo.cookie('ses', null, {expires:-1, path:'/'}); // remove the cookie + dojo.cookie('ses', null, {expires:-1, path:oilsCookiePath}); // remove the cookie dojo.addOnLoad(function(){ if(openils.XUL.isXUL()) { @@ -67,7 +67,7 @@ function oilsSetupUser() { } } - dojo.cookie('ses', authtoken, {path:'/', 'secure' : true}); + dojo.cookie('ses', authtoken, {path:oilsCookiePath, 'secure' : true}); openils.User.authtoken = authtoken; openils.User.workstation = workstation; return authtoken; @@ -115,7 +115,7 @@ function oilsDoLogin() { args.workstation = workstation; if(user.login(args)) { - dojo.cookie('ses', user.authtoken, {path : '/'}); + dojo.cookie('ses', user.authtoken, {path : oilsCookiePath}); location.href = location.href; } else { openils.Util.show('oils-login-failed'); -- 2.11.0