1
0
Fork 0

fix app thumbnails

This commit is contained in:
Jan Steemann 2015-09-29 14:58:35 +02:00
parent 7bd9f03cb1
commit 96d8c24c61
1 changed files with 2 additions and 1 deletions

View File

@ -211,11 +211,12 @@
res.transformations = [ "base64decode" ];
var mount = validateMount(req);
var app = FoxxManager.lookupApp(mount);
if (app.hasOwnProperty("thumbnail")) {
if (app.hasOwnProperty("thumbnail") && app.thumbnail !== null) {
res.body = app.thumbnail;
} else {
res.body = defaultThumb;
}
// evil mimetype detection attempt...
var start = require("internal").base64Decode(res.body.substr(0, 8));
if (start.indexOf("PNG") !== -1) {