[MERGE] forward port of branch saas-2 up to revid 3906 chs@openerp.com-20140402083506-w4cywcf0kxxx9xmk
bzr revid: chs@openerp.com-20140402092310-ixv8m1z53j107024
This commit is contained in:
commit
de117cd8ec
|
@ -271,7 +271,12 @@ instance.web.Session.include( /** @lends instance.web.Session# */{
|
|||
for(var i=0; i<cookies.length; ++i) {
|
||||
var cookie = cookies[i].replace(/^\s*/, '');
|
||||
if(cookie.indexOf(nameEQ) === 0) {
|
||||
return JSON.parse(decodeURIComponent(cookie.substring(nameEQ.length)));
|
||||
try {
|
||||
return JSON.parse(decodeURIComponent(cookie.substring(nameEQ.length)));
|
||||
} catch(err) {
|
||||
// wrong cookie, delete it
|
||||
this.set_cookie(name, '', -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue