Skip to content

Commit

Permalink
Catch badly formatted URL message data and display base mailbox instead
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jan 23, 2015
1 parent 7009ee3 commit 208c888
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions imp/js/base.js
Expand Up @@ -219,9 +219,14 @@ var ImpBase = {
if (type == 'msg') {
type = 'mbox';
tmp = data.split(';');
data = tmp[0];
this.uid = tmp[1].parseViewportUidString().first();
// Fall through to the 'mbox' check below.
if (tmp[1]) {
data = tmp[0];
this.uid = tmp[1].parseViewportUidString().first();
// Fall through to the 'mbox' check below.
} else {
// Invalid formatted data.
data = '';
}
}

if (type == 'mbox' || Object.isUndefined(this.view)) {
Expand Down

0 comments on commit 208c888

Please sign in to comment.