diff --git a/build/basil.js b/build/basil.js index f4a0232..ad152ed 100644 --- a/build/basil.js +++ b/build/basil.js @@ -205,7 +205,9 @@ // if cookie secure activated, ensure it works (not the case if we are in http only) if (options && options.secure) { this.set(_salt, _salt, options); - return this.get(_salt) === _salt; + var hasSecurelyPersited = this.get(_salt) === _salt; + this.remove(_salt); + return hasSecurelyPersited; } return true; }, diff --git a/build/basil.min.js b/build/basil.min.js index 777baea..f774901 100644 --- a/build/basil.min.js +++ b/build/basil.min.js @@ -1 +1 @@ -!function(){var e=function(n){return e.utils.extend({},e.plugins,(new e.Storage).init(n))};e.version="0.4.5",e.utils={extend:function(){for(var e="object"==typeof arguments[0]?arguments[0]:{},n=1;n=0;o--)if(0===(n=i[o].replace(/^\s*/,"")).indexOf(t+"="))return decodeURIComponent(n.substring(t.length+1,n.length));return null},remove:function(e){this.set(e,"",{expireDays:-1});for(var n=document.domain.split("."),t=n.length;t>=0;t--)this.set(e,"",{expireDays:-1,domain:"."+n.slice(-t).join(".")})},reset:function(e){for(var n,t,i=document.cookie?document.cookie.split(";"):[],o=0;o=0;o--)if(0===(n=i[o].replace(/^\s*/,"")).indexOf(t+"="))return decodeURIComponent(n.substring(t.length+1,n.length));return null},remove:function(e){this.set(e,"",{expireDays:-1});for(var n=document.domain.split("."),t=n.length;t>=0;t--)this.set(e,"",{expireDays:-1,domain:"."+n.slice(-t).join(".")})},reset:function(e){for(var n,t,i=document.cookie?document.cookie.split(";"):[],o=0;o