- Notifications
You must be signed in to change notification settings - Fork 305
Patch fix#1227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Patch fix #1227
Changes from all commits
Commits
Show all changes
8 commits Select commit Hold shift + click to select a range
930d10f Patch fix
jaxoncreed 6e8383f Remove console log
jaxoncreed 632d5c9 Fix Ruben Comments
jaxoncreed 58426be replace backslashes to handle windows routes
jaxoncreed 6162411 Fix tests
jaxoncreed efb1361 Reverted original test back because it is async
jaxoncreed 6db0726 More specific test to check for error
jaxoncreed 8da6b00 Correct error comaparison
jaxoncreed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,10 @@ | ||
| @prefix : <#>. | ||
| @prefix acl: <http://www.w3.org/ns/auth/acl#>. | ||
| @prefix c: <https://localhost:7000/profile/card#>. | ||
| @prefix c0: <https://localhost:8443/profile/card#>. | ||
| c:me | ||
| acl:trustedApp | ||
| [ acl:mode acl:Read, acl:Write; acl:origin <https://app.example.com> ]. | ||
| c0:me | ||
| :me | ||
| acl:trustedApp | ||
| [ | ||
| acl:mode acl:Append, acl:Control, acl:Read, acl:Write; | ||
| acl:origin <https://trusted.app> | ||
| ]. | ||
| ], | ||
| [ acl:mode acl:Read, acl:Write; acl:origin <https://app.example.com> ]. |
10 changes: 3 additions & 7 deletions 10 test/resources/accounts-strict-origin-off/alice/profile/card$.ttl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,10 @@ | ||
| @prefix : <#>. | ||
| @prefix acl: <http://www.w3.org/ns/auth/acl#>. | ||
| @prefix c: <https://localhost:7010/profile/card#>. | ||
| @prefix c0: <https://localhost:8443/profile/card#>. | ||
| c:me | ||
| acl:trustedApp | ||
| [ acl:mode acl:Read, acl:Write; acl:origin <https://app.example.com> ]. | ||
| c0:me | ||
| :me | ||
| acl:trustedApp | ||
| [ | ||
| acl:mode acl:Append, acl:Control, acl:Read, acl:Write; | ||
| acl:origin <https://trusted.app> | ||
| ]. | ||
| ], | ||
| [ acl:mode acl:Read, acl:Write; acl:origin <https://app.example.com> ]. | ||
jaxoncreed marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -535,7 +535,7 @@ describe('ResourceMapper', () =>{ | ||
| itMapsFile(mapper, 'a file on a host', | ||
| { | ||
| path: `${rootPath}space/foo.html`, | ||
| path: `${rootPath}example.org/space/foo.html`, | ||
| hostname: 'example.org' | ||
| }, | ||
| { | ||
| @@ -550,7 +550,7 @@ describe('ResourceMapper', () =>{ | ||
| itMapsFile(mapper, 'a file on a host', | ||
| { | ||
| path: `${rootPath}space/foo.html`, | ||
| path: `${rootPath}example.org/space/foo.html`, | ||
| hostname: 'example.org' | ||
| }, | ||
| { | ||
| @@ -564,10 +564,11 @@ describe('ResourceMapper', () =>{ | ||
| itMapsFile(mapper, 'a file with the port', | ||
| { | ||
| path: `${rootPath}space/foo.html` | ||
| path: `${rootPath}example.org/space/foo.html`, | ||
| hostname: 'example.org' | ||
| }, | ||
| { | ||
| url: 'http://localhost:81/space/foo.html', | ||
| url: 'http://localhost:81/example.org/space/foo.html', | ||
| contentType: 'text/html' | ||
| }) | ||
| }) | ||
| @@ -577,7 +578,7 @@ describe('ResourceMapper', () =>{ | ||
| itMapsFile(mapper, 'a file with the port', | ||
| { | ||
| path: `${rootPath}space/foo.html`, | ||
| path: `${rootPath}example.org/space/foo.html`, | ||
| hostname: 'example.org' | ||
| }, | ||
| { | ||
| @@ -591,10 +592,11 @@ describe('ResourceMapper', () =>{ | ||
| itMapsFile(mapper, 'a file with the port', | ||
| { | ||
| path: `${rootPath}space/foo.html` | ||
| path: `${rootPath}example.org/space/foo.html`, | ||
| hostname: 'example.org' | ||
| }, | ||
| { | ||
| url: 'https://localhost:81/space/foo.html', | ||
| url: 'https://localhost:81/example.org/space/foo.html', | ||
| contentType: 'text/html' | ||
| }) | ||
| }) | ||
| @@ -604,14 +606,25 @@ describe('ResourceMapper', () =>{ | ||
| itMapsFile(mapper, 'a file with the port', | ||
| { | ||
| path: `${rootPath}space/foo.html`, | ||
| path: `${rootPath}example.org/space/foo.html`, | ||
| hostname: 'example.org' | ||
| }, | ||
| { | ||
RubenVerborgh marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| url: 'https://example.org:81/space/foo.html', | ||
| contentType: 'text/html' | ||
| }) | ||
| }) | ||
| describe('A ResourceMapper instance for an HTTPS host with non-default port in a multi-host setup', () =>{ | ||
| const mapper = new ResourceMapper({rootUrl: 'https://localhost:81/', rootPath, includeHost: true }) | ||
| it('throws an error when there is an improper file path', () =>{ | ||
| return expect(mapper.mapFileToUrl({ | ||
| path: `${rootPath}example.orgspace/foo.html`, | ||
| hostname: 'example.org' | ||
| })).to.be.rejectedWith(Error, 'Path must start with hostname (/example.org)') | ||
| }) | ||
| }) | ||
| }) | ||
| function asserter (assert){ | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.