SolidOS / SolidOS/solid-ui

`tryParent` in acl.js does not stop before trying to fetch https://

Open
#78 0 comments 0 reactions 1 assignee View on GitHub

@megoth is already working on this.

Since Aug 5, 2019.

Dominant language
TypeScript
Stars
153
Forks
46
Avg merge
1d 8h
Merged PRs (30d)
7

Description

tryParent is a recursive function that takes a URL (e.g. https://foo.com/bar/baz) and tries to find an ACL for that resource by looking at its parent if none are found initially (e.g. https://foo.com/bar/ --> https://foo.com/).

There are a couple of problems with this:

  1. Right now there is a bug that makes it also check https://. We need to stop the recursive function before this happens and give the appropriate error. (There should always be a root ACL, but errors might occur still.)
  2. It will call tryParent if no triples for acl:default are found (https://github.com/solid/solid-ui/blob/master/src/acl.js#L359). This would mean that even though an ACL resource are found, the code will still look for another parent ACL resource, which I think goes against point 2 in https://github.com/solid/web-access-control-spec#acl-inheritance-algorithm.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.