Skip to content

Conversation

@csarven
Copy link
Member

Server breaks when Origin header value is not an IRI. See:

this.agentOrigin=options.strictOrigin&&options.agentOrigin ? rdf.sym(options.agentOrigin) : null

calling rdf.sym where an Error is thrown but it is not caught.

Following examples typically return 200:

$ curl -i https://example.org/ $ curl -iH 'Origin: https://example.net' https://example.org/

Following examples breaks the script (bin/solid.js). 500 returned.

$ curl -iH 'Origin: null' https://example.org/ $ curl -iH 'Origin: breaking bad' https://example.org/

There may be a better way to fix this issue than what's in this PR but I'll leave it in the hands of folks that can do better.

@csarvencsarvenforce-pushed the fix/acl-checker/origin-non-iri-error-handling branch from f85a4bc to 401d5f2CompareSeptember 4, 2023 14:25
Copy link
Contributor

@ewingsonewingson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bourgeoabourgeoa changed the base branch from main to csarvenfix/acl-checker/origin-non-iri-error-handlingOctober 20, 2023 15:12
@bourgeoabourgeoa merged commit 72a3a69 into nodeSolidServer:csarvenfix/acl-checker/origin-non-iri-error-handlingOct 20, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@csarven@ewingson@bourgeoa