Open AbhijeetFasate13 opened 2 years ago
This may be related to URL encoding of the %3A part in did:web:localhost%3A9297:presentations:example-id
Could you try replacing the %3A
part with %253A
?
If we modify the localhost%3A9297 part as localhost%253A9297 in the id then the presentation is verified properly
Yes, it's because while making the request httpie
automatically percent-encodes the URL and converts %3A to a :
. However, the ID needs to include %3A
to be a valid DID - once you percent-encode the %3A
part, it passes the ID to the server properly.
once you percent-encode the %3A part, it passes the ID to the server properly
Is manual encoding required every time or it can be improved?
Is manual encoding required every time or it can be improved?
This issue can't be "fixed" on the server side, it's just that we are passing a valid percent-encoded symbol to the server, and fastify (the server framework) decodes it for us instead of keeping it as-is (which is intended and correct behaviour).
Also, putting in a manual check to change localhost:9297
to localhost%3A9297
in the code here:
is not an acceptable solution as it changes the entity the DID refers to:
did:web:localhost:9297:presentations:123
refers to a DID document at
http://localhost/9297/presentations/123/did.json
did:web:localhost%3A9297:presentations:123
refers to a DID document at
http://localhost:9297/presentations/123/did.json
.Thanks, that made it clear. We should keep this issue open for now.
Is there an existing issue for this?
What is the bug related to?
Registry
Current Behavior/Issue
The presentation id returned is in the form
did:web:localhost%3A9297:presentations:example-id
which is a valid id , but returns the errorA presentation with the specified ID does not exist
.Expected Behavior
The presentation must be returned as verified if valid id is entered.
Steps To Reproduce
No response
Environment
Anything else?
If we modify the localhost%3A9297 part as localhost%253A9297 in the id then the presentation is verified properly