Aleksander Machniak
2015-02-06 56040b941c20d1d2ed2abf3f1993ea550bc13086
Fix so JSON.parse() errors on localStorage items are ignored (#1490249)
2 files modified
6 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/js/app.js 5 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -20,6 +20,7 @@
- Fix bug where signature could have been inserted twice after plain-to-html switch (#1490239)
- Fix security issue in DBMail driver of password plugin (#1490261)
- Enable FollowSymLinks option in .htaccess file which is required by rewrite rules (#1490255)
- Fix so JSON.parse() errors on localStorage items are ignored (#1490249)
RELEASE 1.1-rc
--------------
program/js/app.js
@@ -8159,15 +8159,16 @@
  // wrapper for localStorage.getItem(key)
  this.local_storage_get_item = function(key, deflt, encrypted)
  {
    var item;
    var item, result;
    // TODO: add encryption
    try {
      item = localStorage.getItem(this.get_local_storage_prefix() + key);
      result = JSON.parse(item);
    }
    catch (e) { }
    return item !== null ? JSON.parse(item) : (deflt || null);
    return result || deflt || null;
  };
  // wrapper for localStorage.setItem(key, data)