Make thumbnails more secure

This commit is contained in:
yflory
2017-11-07 14:51:53 +01:00
parent 2ff66e1a7c
commit 6b9ffe8dd1
8 changed files with 73 additions and 23 deletions

View File

@@ -309,6 +309,20 @@ define([
});
});
sframeChan.on('Q_THUMBNAIL_GET', function (data, cb) {
Cryptpad.getThumbnail(data.key, function (e, data) {
cb({
error: e,
data: data
});
});
});
sframeChan.on('Q_THUMBNAIL_SET', function (data, cb) {
Cryptpad.setThumbnail(data.key, data.value, function (e) {
cb({error:e});
});
});
sframeChan.on('Q_SESSIONSTORAGE_PUT', function (data, cb) {
sessionStorage[data.key] = data.value;
cb();