Skip to content

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

Merged
bighappyface merged 2 commits into
jsonrainbow:6.0.0-devfrom
erayd:bugfix-ref-446
Oct 4, 2017
Merged

[BUGFIX] Don't resolve a schema id against itself#452
bighappyface merged 2 commits into
jsonrainbow:6.0.0-devfrom
erayd:bugfix-ref-446

Conversation

@erayd

@erayd erayd commented Oct 4, 2017

Copy link
Copy Markdown
Contributor

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

dkarlovi commented Oct 4, 2017

Copy link
Copy Markdown
Contributor

Probably a good idea to add a test for this.

@shmax

shmax commented Oct 4, 2017

Copy link
Copy Markdown
Collaborator

LGTM

@erayd

erayd commented Oct 4, 2017

Copy link
Copy Markdown
Contributor Author

Probably a good idea to add a test for this.

I agree. Done :-).

@bighappyface bighappyface left a comment

Copy link
Copy Markdown
Collaborator

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