diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index a59b7c02a..58b870afb 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -681,8 +681,20 @@ define([ var sf = files[SHARED_FOLDERS]; var rootFiles = exp.getFiles([ROOT]); var root = exp.find([ROOT]); + var parsed, secret, el; for (var id in sf) { + el = sf[id]; id = Number(id); + + // Fix undefined hash + parsed = Hash.parsePadUrl(el.href || el.roHref); + secret = Hash.getSecrets('drive', parsed.hash, el.password); + if (!secret.keys) { + delete sf[id]; + continue; + } + + // Fix shared folder not displayed in root if (rootFiles.indexOf(id) === -1) { console.log('missing' + id); var newName = Hash.createChannelId();