shared hosting contrib #9

Closed
opened 2023-01-12 17:00:07 +00:00 by tjp · 0 comments
Owner

This might be as simple as a middleware that:

  • identifies URLs with a ~ prefix in the first path component
  • replaces the ~ with some passed-in string, maybe a default of "users/"
  • so that eg: //ctrl-c.club/~tjp/gus is transformed into //ctrl-c.club/users/tjp/gus, which is relatively easy to map into filesystem paths.

The complicated version of this would take a sub-path name (like "/public_gemini") and find the home directory of the actual user named in the ~ path component. So mapping eg //ctrl-c.club/~tjp/gus to /home/travis/public_gemini/gus. But there are likely security implications here which I shudder to think about.

In the first version, the host admin can create the effect of the second by generating "users" as a directory of the appropriate symlinks.

This might be as simple as a middleware that: * identifies URLs with a `~` prefix in the first path component * replaces the `~` with some passed-in string, maybe a default of `"users/"` * so that eg: `//ctrl-c.club/~tjp/gus` is transformed into `//ctrl-c.club/users/tjp/gus`, which is relatively easy to map into filesystem paths. The complicated version of this would take a sub-path name (like `"/public_gemini"`) and find the home directory of the actual user named in the `~` path component. So mapping eg `//ctrl-c.club/~tjp/gus` to `/home/travis/public_gemini/gus`. But there are likely security implications here which I shudder to think about. In the first version, the host admin can create the effect of the second by generating "users" as a directory of the appropriate symlinks.
tjp added this to the v1.0 milestone 2023-01-14 18:04:53 +00:00
tjp added the
enhancement
label 2023-01-14 18:05:30 +00:00
tjp added this to the (deleted) project 2023-01-19 20:58:36 +00:00
tjp added reference shared-hosting 2023-01-19 23:03:43 +00:00
tjp referenced this issue from a commit 2023-01-19 23:04:45 +00:00
tjp closed this issue 2023-01-19 23:05:24 +00:00
This repo is archived. You cannot comment on issues.
No description provided.