Asset canister response "Response verification failed" / "Body does not pass verification"

Asset canisters deployed under dfx >=0.13.1 responds with error for a request that has arbitrary characters in query string.

For example request with a query ?foo=%7B%22a%22%3A1%7D (which is the result of serialized state encodeURIComponent(JSON.stringify({a:1}))) leads to error:

  • “Response verification failed” on service worker “*.ic0.app” domain
  • “Body does not pass verification” on “*.raw.ic0.app” domain

As I understand double quote " is the cause of the error.

Even InternetIdentity website fails to load using url https://identity.ic0.app/?state=a%22s

@Severin maybe you can help?

@raymondk @domwoe @diegop please tag someone who can help

Hi @alexeychirkov

The issue was that response verification currently was decoding the entire URL as a whole, what happened is that for these cases it would break the format for the URI when you have and encoded query string.

I’ve created a PR with a fix for that, i’ll post here again once we’ve released it.

1 Like