Skip to content
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

[BUGFIX] Don't resolve a schema id against itself #452

Merged
merged 2 commits into from
Oct 4, 2017

Conversation

erayd
Copy link
Contributor

@erayd erayd commented Oct 4, 2017

What

Add a missing condition to prevent resolving a schema id against itself. This prevents potential double-resolution of relative paths.

Why

Because this is a bug, and double-resolution of relative paths results in an incorrect dereferencing result.

@dkarlovi
Copy link

dkarlovi commented Oct 4, 2017

Probably a good idea to add a test for this.

@shmax
Copy link
Collaborator

shmax commented Oct 4, 2017

LGTM

@erayd
Copy link
Contributor Author

erayd commented Oct 4, 2017

Probably a good idea to add a test for this.

I agree. Done :-).

Copy link
Collaborator

@bighappyface bighappyface left a comment

Choose a reason for hiding this comment

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

+1 for 8d7af76
+1 for 42071af

@bighappyface bighappyface merged commit c59e7b2 into jsonrainbow:6.0.0-dev Oct 4, 2017
erayd added a commit to erayd/json-schema that referenced this pull request Oct 4, 2017
* Don't resolve a schema id against itself

* Add test for double-resolve bugfix
@erayd erayd mentioned this pull request Oct 4, 2017
bighappyface pushed a commit that referenced this pull request Oct 4, 2017
* Don't resolve a schema id against itself

* Add test for double-resolve bugfix
@erayd erayd deleted the bugfix-ref-446 branch October 5, 2017 04:38
dkarlovi referenced this pull request in dkarlovi/json-schema-behat-external-ref Oct 5, 2017
@erayd erayd mentioned this pull request Oct 10, 2017
Sign up for free to 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.

4 participants