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

Fix index out of bounds error when trying to parse illegal history resource identifier #2227

Merged

Conversation

mmsmits
Copy link
Member

@mmsmits mmsmits commented Sep 6, 2022

fixes: #2190

Copy link
Member

@marcovisserFurore marcovisserFurore left a comment

Choose a reason for hiding this comment

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

See my comments

@@ -249,7 +249,7 @@ public void TestIsResourceId()
Assert.IsFalse(ResourceIdentity.IsRestResourceIdentity("http://nu.nl/fhir/crap"));
Assert.IsFalse(ResourceIdentity.IsRestResourceIdentity("x/y/z/4"));
Assert.IsFalse(ResourceIdentity.IsRestResourceIdentity("urn:oid:1.2.3.4.5"));
Assert.IsFalse(ResourceIdentity.IsRestResourceIdentity("XXX/_history/1"));
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, this unit test does not test the parsing. It only checks if the uri matches the pattern.
Please add an new testmethod like TestBuild.

@marcovisserFurore marcovisserFurore merged commit 622d94b into develop-stu3 Sep 7, 2022
@marcovisserFurore marcovisserFurore deleted the bugfix/2190-handle-invalid-resource-identity branch September 7, 2022 09:44
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.

ResourceIdentity error with reference XXX/_history/1
2 participants