Engineering-Research-and-Development / true-connector-basic_data_app

GNU Affero General Public License v3.0
2 stars 9 forks source link

Missing requestedElement not working correct #92

Open IgorBalog-Eng opened 1 year ago

IgorBalog-Eng commented 1 year ago

If in proxy request, you omit requestedElement it will create invalid ArtifactRequestMessage, since proxyRequest.getRequestedArtifact() will be empty string and next not null check will not be correctly evaluated, and url will be "", which will fail on consumer side.

Change following: String artifactURI = proxyRequest.getRequestedArtifact() != null ? proxyRequest.getRequestedArtifact() : UtilMessageService.REQUESTED_ARTIFACT.toString(); To use StringUtils.isNoneBlank(proxyRequest.getRequestedArtifact())

Why this one does not fail in dataApp, when creating message - do not know. If time, investigate why this was possible in the first place.