Stop sending labkeyVersion in our CSPs#7432
Conversation
labkey-jeckels
left a comment
There was a problem hiding this comment.
Testing locally, the CSP doesn't have the version in it anymore, as intended.
However, when I have a CSP violation and it's reported, my local server gives a 400 reply to admin-contentSecurityPolicyReportTo.view?cspVersion=e14:
{
"exception": "Error binding property: Cannot deserialize value of type `org.labkey.core.admin.AdminController$ReportToJsonObjects` from Object value (token `JsonToken.START_OBJECT`)\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]",
"success": false,
"errors": [
{
"msg": "Error binding property: Cannot deserialize value of type `org.labkey.core.admin.AdminController$ReportToJsonObjects` from Object value (token `JsonToken.START_OBJECT`)\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]",
"severity": "Error",
"field": "form",
"id": "form",
"message": "Error binding property: Cannot deserialize value of type `org.labkey.core.admin.AdminController$ReportToJsonObjects` from Object value (token `JsonToken.START_OBJECT`)\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]"
}
]
}
Chrome seems to work. Safari doesn't, likely predating this change. Here's what it's trying to POST: |
Okay, so Chrome and Firefox always post an array of JSON objects. Apparently Safari posts single objects. That's annoying, but glad you caught it. |
…addition to those (e.g., Chrome) that post an array of JSON reports
|
@labkey-jeckels can you test this locally against Safari? Current version is no longer supported on Windows. I did test your JSON example via the query-apiTest action. |
Confirmed on Safari, Chrome, and Firefox. |
Rationale
https://github.com/LabKey/internal-issues/issues/858
Also, support browsers (e.g., Safari) that post individual JSON reports in addition to those (e.g., Chrome) that post an array of JSON reports