What changed, and why it matters
This commit removes support for a special callback protocol called 'srbn://' from Sparrow Wallet's Auth47 authentication feature. Previously, Auth47 could accept callbacks using this protocol, which would be converted to HTTPS and sent through a different response path involving a 'Soroban' directory service. Now, only HTTPS and HTTP-onion callbacks are accepted. The change is defensive: it narrows what callback types are allowed and removes a less common code path, but the commit message does not say it fixes a specific security vulnerability.
Treat this as a hardening change rather than an urgent security fix. Review whether any live deployments or documentation still reference srbn:// Auth47 callbacks, and ensure users relying on Soroban-based authentication have a migration path. If this removal was motivated by an undisclosed security concern, monitor the project for follow-up disclosures or advisory text.
Security signals we found
Removal of an alternative callback protocol (srbn://) reduces parser and URL-rewriting attack surface.
Elimination of a separate Soroban response path removes a code branch that constructed JSON-RPC directory.Add messages.
Callback validation is tightened to only https and http .onion schemes.
No explicit security bug, CVE, or vulnerability description is present in the commit or supplied references.
Evidence from the diff
The patch deletes the SRBN_PROTOCOL (‘srbn://’) handling from Auth47.java. It removes the srbn and srbnName fields, the sendSorobanResponse method, the SorobanResponse/SorobanParam helper classes, and the associated unit test. Callback validation now only permits HTTPS or HTTP .onion URLs via Utils.isSecureUrl. The error message is updated to no longer mention srbn. The change reduces attack surface by eliminating a callback scheme and a JSON-RPC directory.Add response path, but the commit itself does not disclose a concrete bug or CVE.
Changed components
src/main/java/com/sparrowwallet/sparrow/net/Auth47.javasrc/test/java/com/sparrowwallet/sparrow/net/Auth47Test.javaInspect captured patch +10 / −67
### src/main/java/com/sparrowwallet/sparrow/net/Auth47.java
@@ -23,14 +23,10 @@ public class Auth47 {
public static final String SCHEME = "auth47";
public static final String VERSION = "1.0";
- public static final String HTTPS_PROTOCOL = "https://";
- public static final String SRBN_PROTOCOL = "srbn://";
private final String nonce;
private final URL callback;
private final String expiry;
- private boolean srbn;
- private String srbnName;
private String resource;
private boolean resourceSpecified;
@@ -60,27 +56,18 @@ public Auth47(URI uri) throws MalformedURLException, URISyntaxException {
if(strCallback == null) {
throw new IllegalArgumentException("No callback parameter provided.");
}
- if(strCallback.startsWith(SRBN_PROTOCOL)) {
- String srbnCallback = HTTPS_PROTOCOL + strCallback.substring(SRBN_PROTOCOL.length());
- URL srbnUrl = new URI(srbnCallback).toURL();
- this.srbn = true;
- this.srbnName = srbnUrl.getUserInfo();
- this.callback = new URI(HTTPS_PROTOCOL + srbnUrl.getHost()).toURL();
- } else {
- URI callbackUri = new URI(strCallback);
- if(!Utils.isSecureUrl(callbackUri)) {
- throw new IllegalArgumentException("Invalid callback parameter (not https, http .onion or srbn): " + strCallback);
- }
- this.callback = callbackUri.toURL();
+ URI callbackUri = new URI(strCallback);
+ if(!Utils.isSecureUrl(callbackUri)) {
+ throw new IllegalArgumentException("Invalid callback parameter (not https or http .onion): " + strCallback);
}
+ this.callback = callbackUri.toURL();
this.expiry = parameterMap.get("e");
this.resource = parameterMap.get("r");
- String defaultResource = srbn ? "srbn" : strCallback;
if(resource == null) {
- this.resource = defaultResource;
+ this.resource = strCallback;
} else {
- this.resourceSpecified = !resource.equals(defaultResource);
+ this.resourceSpecified = !resource.equals(strCallback);
}
}
@@ -89,27 +76,7 @@ public void sendResponse(Wallet wallet) throws Exception {
throw new Auth47Exception("A software wallet is required to authenticate.");
}
- if(srbn) {
- sendSorobanResponse(wallet);
- } else {
- sendHttpResponse(wallet);
- }
- }
-
- public void sendHttpResponse(Wallet wallet) throws Exception {
- String json = getJsonResponse(wallet);
-
- send(json);
- }
-
- public void sendSorobanResponse(Wallet wallet) throws Exception {
- String json = getJsonResponse(wallet);
-
- SorobanResponse sorobanResponse = new SorobanResponse(srbnName, json);
- Gson gson = new GsonBuilder().disableHtmlEscaping().create();
- String jsonRpc = gson.toJson(sorobanResponse);
-
- send(jsonRpc);
+ send(getJsonResponse(wallet));
}
private String getJsonResponse(Wallet wallet) {
@@ -206,28 +173,6 @@ public Response(String version, String challenge, String signature, String payme
public String address;
}
- private static class SorobanResponse {
- public SorobanResponse(String name, String response) {
- params.add(new SorobanParam(name, response));
- }
-
- public String jsonrpc = "2.0";
- public int id = 0;
- public String method = "directory.Add";
- public List<SorobanParam> params = new ArrayList<>();
- }
-
- private static class SorobanParam {
- public SorobanParam(String name, String entry) {
- Name = name;
- Entry = entry;
- }
-
- public String Name;
- public String Entry;
- public String Mode = "short";
- }
-
public static final class Auth47Exception extends Exception {
public Auth47Exception(String message) {
super(message);
### src/test/java/com/sparrowwallet/sparrow/net/Auth47Test.java
@@ -17,11 +17,9 @@ public void acceptsHttpsCallbacksWithResource() throws Exception {
}
@Test
- public void acceptsSrbnCallbacks() throws Exception {
- Auth47 auth47 = new Auth47(new URI("auth47://nonce?c=srbn://alice@relay.example.com"));
-
- assertEquals("https", auth47.getCallback().getProtocol());
- assertEquals("relay.example.com", auth47.getCallback().getHost());
+ public void rejectsSrbnCallbacks() {
+ assertThrows(IllegalArgumentException.class, () ->
+ new Auth47(new URI("auth47://nonce?c=srbn://alice@relay.example.com")));
}
@TestWhy this scored 41/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.