Browse Source

Disabled file preview for SVG

Security improvement (kudos to Sergey Belov, https://sergeybelove.ru)
master
Igor Zhukov 9 years ago
parent
commit
812801c752
  1. 4
      app/js/services.js

4
app/js/services.js

@ -1856,7 +1856,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) @@ -1856,7 +1856,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
var doc = angular.copy(docs[docID]),
isGif = doc.mime_type == 'image/gif',
isSticker = doc.mime_type.substr(0, 6) == 'image/' && doc.sticker,
isSticker = doc.mime_type == 'image/webp' && doc.sticker,
thumbPhotoSize = doc.thumb,
width, height;
@ -1901,7 +1901,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) @@ -1901,7 +1901,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
}
doc.thumb = thumb;
doc.withPreview = !Config.Mobile && doc.mime_type.match(/^(image\/)/) ? 1 : 0;
doc.withPreview = !Config.Mobile && doc.mime_type.match(/^image\/(gif|png|jpeg|jpg|bmp|tiff)/) ? 1 : 0;
if (isGif && doc.thumb) {
doc.isSpecial = 'gif';

Loading…
Cancel
Save