Description
Relative URIs in ACL files (e.g., <./resource> or <./>) are not being resolved relative to the ACL file's location. This requires using absolute URLs in ACL files, which is non-standard.
Expected Behavior
Per the Solid WAC spec, relative URIs in ACL files should resolve relative to the ACL document's URL. For example, in /credit/.acl:
<#public>
a acl:Authorization ;
acl:accessTo <./> ; # Should resolve to /credit/
acl:default <./> ;
acl:mode acl:Read .
Actual Behavior
Relative URIs don't match. Only absolute URLs work:
{
"acl:accessTo": {"@id": "http://melvincarvalho.com/credit/week.json"}
}
Location
The issue appears to be in src/wac/checker.js in the urlMatches function, which does a simple string comparison without resolving relative URIs first.
Suggested Fix
Before comparing URLs in urlMatches(), resolve relative URIs against the ACL document's base URL.
Description
Relative URIs in ACL files (e.g.,
<./resource>or<./>) are not being resolved relative to the ACL file's location. This requires using absolute URLs in ACL files, which is non-standard.Expected Behavior
Per the Solid WAC spec, relative URIs in ACL files should resolve relative to the ACL document's URL. For example, in
/credit/.acl:Actual Behavior
Relative URIs don't match. Only absolute URLs work:
{ "acl:accessTo": {"@id": "http://melvincarvalho.com/credit/week.json"} }Location
The issue appears to be in
src/wac/checker.jsin theurlMatchesfunction, which does a simple string comparison without resolving relative URIs first.Suggested Fix
Before comparing URLs in
urlMatches(), resolve relative URIs against the ACL document's base URL.