Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Fix e2e attachment download by using iframes. #562
Conversation
NegativeMjark
added some commits
Nov 16, 2016
NegativeMjark
self-assigned this
Nov 17, 2016
matrixbot
commented
Nov 17, 2016
|
Can one of the admins verify this patch? |
NegativeMjark
added some commits
Nov 17, 2016
NegativeMjark
referenced this pull request
in vector-im/riot-web
Nov 21, 2016
Closed
Support for large encrypted attachments #2615
|
Needs vector-im/vector-web#2659 otherwise the download links will look awful. |
NegativeMjark
assigned
dbkr
and unassigned
NegativeMjark
Nov 28, 2016
| +// ordinary javascript function which then is turned into a string using | ||
| +// toString(). | ||
| +// | ||
| +const DEFAULT_CROSS_ORIGIN_RENDERER = "https://usercontent.riot.im/v1.html"; |
NegativeMjark
Nov 28, 2016
Contributor
This should probably be configurable. But I can't see a nice way to get values from vector-web's config.json to here.
dbkr
reviewed
Nov 29, 2016
Couple of comment typos. Agree on the usercontent location, wonder if there's a way to get the config option through nicely
| +// For attachments downloaded directly from the homeserver we can use | ||
| +// Content-Security-Policy headers to disable script execution. | ||
| +// | ||
| +// But attachments with end-to-end ecryption are more difficult to handle. |
| +// the downside of using a sandboxed iframe is that the browers are overly | ||
| +// restrictive in what you are allowed to do with the generated URL. | ||
| +// | ||
| +// For now given how unusable the blobs generated in sandboxed iframes we'll |
| thumbnailPromise.then((thumbnailUrl) => { | ||
| - decryptFile(content.file).then((contentUrl) => { | ||
| + decryptFile(content.file).then(function(blob) { |
| thumbnailPromise.then((thumbnailUrl) => { | ||
| - decryptFile(content.file).then((contentUrl) => { | ||
| + decryptFile(content.file).then(function(blob) { |
dbkr
and others
added some commits
Dec 2, 2016
NegativeMjark
merged commit 81e429e
into
develop
Dec 2, 2016
dbkr
deleted the
markjh/attachment_download
branch
Dec 14, 2016
Half-Shot
added a commit
to Half-Shot/matrix-react-sdk
that referenced
this pull request
Feb 9, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NegativeMjark commentedNov 17, 2016
•
edited
Allows users to download attachments that are bigger than 2MB.