From: phasefx Date: Tue, 28 Sep 2010 21:12:11 +0000 (+0000) Subject: Delete all cookies on logoff. There's dojo code that looks for stale session cookies... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cf3d40beb44dac3daa65826f761e19297479e492;p=contrib%2FConifer.git Delete all cookies on logoff. There's dojo code that looks for stale session cookies and has the xul client prompt for a new session. When you logoff, the session is destroyed, but the stale cookies were being left behind (and not overwritten on login? I don't understand that part). But this fixes it git-svn-id: svn://svn.open-ils.org/ILS/trunk@18093 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/auth/session.js b/Open-ILS/xul/staff_client/chrome/content/auth/session.js index 4585a070a5..ca5cb0d39b 100644 --- a/Open-ILS/xul/staff_client/chrome/content/auth/session.js +++ b/Open-ILS/xul/staff_client/chrome/content/auth/session.js @@ -115,6 +115,13 @@ auth.session.prototype = { 'close' : function () { var obj = this; obj.error.sdump('D_AUTH','auth.session.close()\n'); + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + Components.classes["@mozilla.org/cookiemanager;1"] + .getService(Components.interfaces.nsICookieManager).removeAll(); + } catch(E) { + dump('Error in auth/session.js, close(): ' + E + '\n'); + } if (obj.key) obj.network.request( api.AUTH_DELETE.app, api.AUTH_DELETE.method,