Skip to content

Commit

Permalink
MAT-6547 XSS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adongare committed Feb 23, 2024
1 parent 7e399e7 commit 53d25a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/main/java/gov/cms/madie/resources/PackageController.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ public String getMeasureSimpleXml(

@PutMapping(
value = "/hqmf",
produces = {
MediaType.APPLICATION_XML_VALUE,
},
consumes = {MediaType.APPLICATION_JSON_VALUE})
produces = MediaType.APPLICATION_XML_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> generateHqmf(
@RequestBody @Validated(Measure.ValidationSequence.class) Measure measure) throws Exception {
// generate HQMF if the model type is QDM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ void testGetMeasureHqmf() throws Exception {
.contentType(MediaType.APPLICATION_JSON_VALUE))
.andExpect(status().isOk())
.andReturn();
assertThat(mvcResult.getResponse().getContentType(), is(equalTo("application/xml")));
assertThat(
mvcResult.getResponse().getContentType(), is(equalTo("application/xml;charset=UTF-8")));
verify(hqmfService, times(1)).generateHqmf(any(QdmMeasure.class));
}

Expand Down

0 comments on commit 53d25a6

Please sign in to comment.