Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trim whitespace when processing dids (#1299)
* Trim whitespace when processing dids I had some issues when enabling a custom domain using the .well-known file method because of the EOL character – as the code currently stands, any `did` followed by an EOL character is passed for verification as: ``` "responseBody": { "did": "<did>\n" } ``` The presence of the trailing newline character leads to the user receiving the error "The server gave an invalid response and may be out of date". I solved the issue by removing the EOL character from my `did` file, but it would be neater if this was done for the user. Signed-off-by: Feroz Salam <[email protected]> * Update did handling based on PR feedback - Read the file in text, strip out non-ASCII chars - Read in the first line of the file and strip any remaining newline characters * identity: don't remove non-ASCII characters simplifies what we are normalizing: just take the first line and strip whitespace, don't try to remove any non-ASCII characters as well. --------- Signed-off-by: Feroz Salam <[email protected]> Co-authored-by: bnewbold <[email protected]>
- Loading branch information