diff --git a/.classpath b/.classpath
index 1ca251e..ac1cb85 100644
--- a/.classpath
+++ b/.classpath
@@ -29,6 +29,13 @@
+
+
+
+
+
+
+
diff --git a/SECURITY.md b/SECURITY.md
index 6c18209..9f1e5a5 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -1,5 +1,9 @@
# Security Policy
+## Supported Versions
+
+Only new releases of this project will contain security updates. All clients should use the latest version of this project in their dependencies. There is no process in place to backport security fixes to previous releases. If you require a backport, please [create an issue](../../issues/new/choose) containing an explanation of why the latest version cannot be used.
+
## Reporting a Vulnerability
Please report all potential security vulnerabilities using the [Report a vulnerability](../../security/advisories/new) button in the [Security](../../security) section of this repository.
diff --git a/gradle.properties b/gradle.properties
index e7e6890..9f516e1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-fhirCoreVersion = 6.5.4
+fhirCoreVersion = 6.5.5-SNAPSHOT
apachePoiVersion = 5.2.1
jacksonVersion = 2.16.0
apacheHttpcomponentsVersion = 4.5.13
diff --git a/src/main/java/org/hl7/fhir/definitions/model/Definitions.java b/src/main/java/org/hl7/fhir/definitions/model/Definitions.java
index 6c9148f..a90c31f 100644
--- a/src/main/java/org/hl7/fhir/definitions/model/Definitions.java
+++ b/src/main/java/org/hl7/fhir/definitions/model/Definitions.java
@@ -591,7 +591,7 @@ public void checkContextValid(StructureDefinitionContextComponent ec, String con
throw new Error("The element context '"+ec.getExpression()+"' is not valid @ "+context);
} else if (ec.getType() == ExtensionContextType.FHIRPATH) {
FHIRPathEngine fpe = new FHIRPathEngine(worker);
- TypeDetails td = fpe.check(null, null, null,null, ec.getExpression());
+ TypeDetails td = fpe.check(null, null, null, null, ec.getExpression());
if (td.hasNoTypes())
throw new Error("The resource context '"+ec.getExpression()+"' is not valid @ "+context);
else
diff --git a/src/main/java/org/hl7/fhir/tools/converters/SpecNPMPackageGenerator.java b/src/main/java/org/hl7/fhir/tools/converters/SpecNPMPackageGenerator.java
index 64c97e9..9f4f7fe 100644
--- a/src/main/java/org/hl7/fhir/tools/converters/SpecNPMPackageGenerator.java
+++ b/src/main/java/org/hl7/fhir/tools/converters/SpecNPMPackageGenerator.java
@@ -574,8 +574,9 @@ private Map loadZip(InputStream stream) throws IOException {
private FHIRVersion determineVersion(Map files) throws FHIRException {
byte[] b = files.get("version.info");
- if (b == null)
- return FHIRVersion.NULL;
+ if (b == null) {
+ throw new FHIRException("No version information available");
+ }
String s = new String(b);
s = Utilities.stripBOM(s).trim();
while (s.charAt(0) != '[')
diff --git a/src/main/java/org/hl7/fhir/tools/publisher/BuildWorkerContext.java b/src/main/java/org/hl7/fhir/tools/publisher/BuildWorkerContext.java
index d601e2d..f66d80b 100644
--- a/src/main/java/org/hl7/fhir/tools/publisher/BuildWorkerContext.java
+++ b/src/main/java/org/hl7/fhir/tools/publisher/BuildWorkerContext.java
@@ -34,6 +34,7 @@
import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider;
import org.hl7.fhir.r5.conformance.profile.ProfileUtilities;
import org.hl7.fhir.r5.context.BaseWorkerContext;
+import org.hl7.fhir.r5.context.BaseWorkerContext.IByteProvider;
import org.hl7.fhir.r5.context.CanonicalResourceManager;
import org.hl7.fhir.r5.context.ContextUtilities;
import org.hl7.fhir.r5.context.HTMLClientLogger;
@@ -111,6 +112,7 @@
*/
public class BuildWorkerContext extends BaseWorkerContext implements IWorkerContext, ProfileKnowledgeProvider {
+
private static final String SNOMED_EDITION = "900000000000207008"; // international
// private static final String SNOMED_EDITION = "731000124108"; // us edition
@@ -777,7 +779,7 @@ public int loadFromPackageInt(NpmPackage pi, IContextResourceLoader loader, List
}
}
for (String s : pi.list("other")) {
- binaries.put(s, TextFile.streamToBytes(pi.load("other", s)));
+ binaries.put(s, new BytesFromPackageProvider(pi, s));
}
if (version == null) {
version = pi.version();
diff --git a/src/main/java/org/hl7/fhir/tools/publisher/ExampleInspector.java b/src/main/java/org/hl7/fhir/tools/publisher/ExampleInspector.java
index 6b802d8..771ccee 100644
--- a/src/main/java/org/hl7/fhir/tools/publisher/ExampleInspector.java
+++ b/src/main/java/org/hl7/fhir/tools/publisher/ExampleInspector.java
@@ -897,6 +897,16 @@ public ReferenceValidationPolicy getReferencePolicy() {
return ReferenceValidationPolicy.IGNORE;
}
+ @Override
+ public IValidationPolicyAdvisor getPolicyAdvisor() {
+ return null;
+ }
+
+ @Override
+ public IValidationPolicyAdvisor setPolicyAdvisor(IValidationPolicyAdvisor policyAdvisor) {
+ return null;
+ }
+
}
diff --git a/src/main/java/org/hl7/fhir/tools/publisher/Publisher.java b/src/main/java/org/hl7/fhir/tools/publisher/Publisher.java
index adce8e7..ef27f98 100644
--- a/src/main/java/org/hl7/fhir/tools/publisher/Publisher.java
+++ b/src/main/java/org/hl7/fhir/tools/publisher/Publisher.java
@@ -1015,9 +1015,9 @@ private boolean testSearchParameter(SearchParameter sp, StructureDefinition rd)
String exp = sp.getExpression().replace("{{name}}", rd.getType()); // for templates
TypeDetails td = null;
if (sp.getBase().size() > 1) {
- td = fpe.check(null, rd.getType(), rd.getType(), page.getWorkerContext().getResourceNames(), fpe.parse(exp), set);
+ td = fpe.check(null, "Resource", rd.getType(), page.getWorkerContext().getResourceNames(), fpe.parse(exp), set);
} else {
- td = fpe.check(null, rd.getType(), rd.getType(), rd.getType(), fpe.parse(exp), set);
+ td = fpe.check(null, "Resource", rd.getType(), rd.getType(), fpe.parse(exp), set);
}
if (!Utilities.existsInList(sp.getCode(), "_id", "_in") && sp.getType() != SearchParamType.COMPOSITE) {
String types = page.getDefinitions().getAllowedSearchTypes().get(sp.getType().toCode());
@@ -1189,9 +1189,9 @@ private boolean checkInvariant(FHIRPathEngine fpe, StructureDefinition sd,
try {
Set set = new HashSet<>();
if (sd.getKind() == StructureDefinitionKind.RESOURCE) {
- fpe.check(null, sd.getType(), sd.getType(), ed.getPath(), fpe.parse(inv.getExpression()), set);
+ fpe.check(null, "Resource", sd.getType(), ed.getPath(), fpe.parse(inv.getExpression()), set);
} else {
- fpe.check(null, "Resource", "DomainResource", ed.getPath(), fpe.parse(inv.getExpression()), set);
+ fpe.check(null, "Resource", "Resource", ed.getPath(), fpe.parse(inv.getExpression()), set);
}
for (ElementDefinition edt : set) {
if (!edt.getPath().equals(ed.getPath()) && map.containsKey(edt.getPath())) {
@@ -1494,7 +1494,7 @@ private void checkExpression(StringBuilder b, FHIRPathEngine fp, FHIRPathUsage p
b.append(p.getResource() + " (" + p.getContext() + "): " + p.getExpression()+"\r\n");
try {
if (!"n/a".equals(p.getExpression())) {
- fp.check(null, p.getResource(), p.getResource(), p.getContext(), p.getExpression());
+ fp.check(null, "Resource", p.getResource(), p.getContext(), p.getExpression());
}
} catch (Exception e) {
ValidationMessage validationMessage = new ValidationMessage(Source.Publisher, IssueType.STRUCTURE, -1, -1, p.getLocation(),