Revert "Decode domain in did:web method."

This reverts commit 24ef0b06b86efd2b8985d2dc43c765c06fcb97e6.
This commit is contained in:
Xavi Aracil 2023-09-28 09:29:04 +02:00
parent 2b0fd49957
commit cc6dbbcd37

View File

@ -2,7 +2,6 @@ package org.oneedtech.inspect.vc.probe;
import java.io.StringReader;
import java.net.URI;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.List;
@ -112,7 +111,7 @@ public class EmbeddedProofProbe extends Probe<VerifiableCredential> {
methodSpecificId = methodSpecificId.replaceAll(":", "/");
// 2. If the domain contains a port percent decode the colon.
String portPercentEncoded = URLDecoder.decode(":", Charset.forName("UTF-8"));
String portPercentEncoded = URLEncoder.encode(":", Charset.forName("UTF-8"));
int index = methodSpecificId.indexOf(portPercentEncoded);
if (index >= 0 && index < methodSpecificId.indexOf("/")) {
methodSpecificId = methodSpecificId.replace(portPercentEncoded, ":");