-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downloads inside HTML5 apps do not work #11987
Comments
Hi @jredrejo, could you give me an example of such html5 app? |
Yes, @poju3185 here's one: https://articulateusercontent.com/review/uploads/cPj4SORrydR49zuKNHfjfUrAe2RyfIyd/DxkvFL4f/index.html#/lessons/HCQgFWFRBDiv8VRaUq_uEDqzaF-57tXg Anyway, it's important to understand the broader implications of enabling downloads through iframes. This goes beyond a simple code change. Implementing this change would require:
Finally, the most crucial aspect is mitigating the risk of malicious content. How can we ensure uploaded content doesn't cause harm, and how much can we trust imported content? Cryptography might be a solution, but allowing anyone to upload apps with download capabilities opens up security vulnerabilities. As you can see, this is a complex feature with significant technical and architectural considerations. Its feasibility needs careful evaluation. |
Thank you for the detailed explanation! Given the complexity and the careful evaluation needed to ensure both functionality and security, I think I'll sit this one out and observe for now. I look forward to seeing how this develops and learning from the process. |
yes, but if this html app is added in a channel for kolibri you can't , that's what this issue tries to change |
I see. Thank you. |
@jredrejo I see that this issue has the tag TODO:needs decision. But you have specified in great detail on what to do. If this issue is up for grabs, I would like to solve this issue. |
There's still a strong concern here about the potential for malicious behaviour. Loosening the sandbox, even selectively, would allow programmatically initiated downloads as well as user initiated ones. I am not sure that allowing any loosening of the sandbox is actually desirable, but rather allowing non-renderable files to be included as separate file attachments, which the user can then choose to download via the user interface. Either way, this issue is not ready for contribution, hence the needs decisions label. |
Observed behavior
Some HTML5 apps include content that can be donwloaded, as documentation, images, etc.
Current iframe sandbox in Kolibri blocks them.
Errors and logs
Just clicking on a download link does not produce any effect
There is an allow-downloads attribute for iframe that might be enabled globally in Kolibri to allow this.
Expected behavior
Clicking in a link to download a resource should work inside HTML5 apps
As this introduces security issues in some cases ( it would allow HTML5 apps to initiate downloads programmatically as well as through user interaction), the ideal solution would be adding an option to the
HTML5AppNode
to use it (beingfalse
by default)User-facing consequences
Users can not use all the contents the app includes
Steps to reproduce
For example, courses or tutorial including documentation for further reading
don't allow this documentation to be downloaded, even if the document is included in the
HTML5AppNode
Context
kolibri 0.16.0
The text was updated successfully, but these errors were encountered: