question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

core/view/alert/ API endpoint returns malformed json

See original GitHub issue

When hitting the /core/view/alert/ API endpoint for alerts for the Content Security Policy (CSP) Header Not Set and Base64 Disclosure types the response is malformed json. The json response doesn’t look complete and the HUD can’t process them causing an error.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
thc202commented, May 22, 2018

Closing, no longer relevant the alerts are being obtained through the Websocket channel (#105).

(I opened a PR to fix the issue anyway, the API is still being used, for other purposes.)

0reactions
thc202commented, Mar 16, 2018

The problem is in: https://github.com/psiinon/zap-hud/blob/fb7027f2cae5a1d41f101e82670584cd6baaf196/src/org/zaproxy/zap/extension/hud/HudApiProxy.java#L98 it should be

msg.getResponseHeader().setContentLength(msg.getResponseBody().length());

but not a problem once moved to WebSocket.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web API error response for malformed json using Text.Json is ...
When a malformed Json is sent to a route the default serializer Text.Json creates a misleadig error message and exposes internal information.
Read more >
Malformed JSON: Expected '{' - Salesforce Stack Exchange
Any time I test deserialization, I feed directly serialized data into the system as my input. It's much easier to control and understand, ......
Read more >
Malformed JSON when calling API from JAVA - Stack Overflow
I'm getting the below error when calling a AVALARA API from a Java application. {"ResultCode": "Error","Messages": [{"Summary": "Malformed JSON near ...
Read more >
Receiving a Malformed JSON Error When Using API Doc
However, when the information is entered and "Try it out" is clicked, the response is a malformed JSON error.
Read more >
Malformed JSON: Expected '[' at the beginning of List/Set ...
Malformed JSON : Expected '[' at the beginning of List/Set (REST API). I am calling the below class from the lighting component OR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found