-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
RFC 8183 XML responses submitted via the UI are incorrectly escaped #875
Comments
With Lagosta builds for the following commits the XML POST problem status is as follows:
|
So, reverting the Lagosta Yarn dependencies upgrade resolves the issue. As there are a high number of dependabot security issues open in the Lagosta repo we have to look at the dependencies anyway so for now I'll leave the Yarn upgrade reverted and push the updated Lagosta to the Krill v0.10.0-rc3 branch to resolve this issue. |
This should now be fixed in the |
I'll leave this open until we have published v0.10.0-rc3. |
A divide and conquer approach to upgrading the yarn dependencies for critical and high dependabot security alerts in Lagosta seems to have narrowed the cause of this issue down to upgrading axios from 0.21.1 to 0.21.2. |
…thout causing NLnetLabs/krill#875. Don't use content-type application/json for XML as the JSON content-type causes Axios to stringify the non-JSON payload.
Rather than just revert the yarn upgrades, PR NLnetLabs/lagosta#137 upgrades axios without causing the issue that naive upgrading of axios to 0.21.2 causes. Once this is solved we can also look at upgrading other yarn dependencies safe in the knowledge that this UI breakage was caused by the axios upgrade and not by upgrading other packages. |
Krill version: v0.10.0-rc2
Submitting a valid RFC 8183 repository response XML via the Repository tab in the UI will fail with an "Invalid JSON" error.
This appears to be because the Krill server code checks for a leading
<
character to determine if the request body contains XML as opposed to JSON, but since Lagosta commit NLnetLabs/lagosta@8eb658c the UI, before sending the valid XML, first double quotes the XML and escapes embedded double quotes, e.g. according to FireFox it does the equivalent of the following HTTP POST:(omitting most HTTP request headers, with added embedded line breaks for readability)
Note it also still sends a
Content-Type: application/json
header as well which is clearly wrong...This causes the UI tests to fail. Blindly reverting the Lagosta commit mentioned above "solves" the problem.
The text was updated successfully, but these errors were encountered: