Replies: 6 comments 2 replies
-
Yeah this is intended behavior. There's a security risk involved with executing HTML/JS under a mount and we need to make sure that the Hyperdrive opts into doing it. (That risk is that the HTML/JS runs under the origin of the parent drive and inherits its permissions.) What we need to do is add a way to configure mounts to allow HTML/JS to run, almost like an execution bit. |
Beta Was this translation helpful? Give feedback.
-
Shouldn’t treating them as different origins give the same security grantees as you get with the web platform at large? So drive hyper://hash111 would see resources from a mounted drive as hyper://hash222. |
Beta Was this translation helpful? Give feedback.
-
Yes but we can’t actually treat subpaths as separate origins. Chromium has a ton of logic baked into the origin definition which doesn’t allow that.
|
Beta Was this translation helpful? Give feedback.
-
Would it be an option to treat navigating into a mounted drive as a redirection? Say you have mounted This strikes me as the most straightforward solution technically, though I haven't fully thought through any possible UX implications. |
Beta Was this translation helpful? Give feedback.
-
That's what I was thinking but failing to communicate. |
Beta Was this translation helpful? Give feedback.
-
There are other suitable security mechanisms like Content-Security-Policy or Cross-Origin-Resource-Policies that could be adopted. Beaker could have a strict CSP on mount-points unless an CSP override policy is stored in metadata on the mount-point. A CSP can be applied to everything on a subpath. It would require Beaker to walk the directory tree to find the highest mounted directory policy, though. |
Beta Was this translation helpful? Give feedback.
-
So the browser show the source code and doesn't render the page.
Is this the expected behaviour?
Beta Was this translation helpful? Give feedback.
All reactions