From: Thomas Berezansky Date: Tue, 22 Dec 2015 18:11:47 +0000 (-0500) Subject: Selfcheck Cookie Path X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=35f37892bd02ef8347db585873667f89c887d38b;p=evergreen%2Fpines.git 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 --- 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');