Skip to content

Commit

Permalink
Allow dashes in ethstats password (hyperledger#5090)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Dudley <[email protected]>
  • Loading branch information
siladu authored and elenduuche committed Aug 16, 2023
1 parent 21a3524 commit 5e4c7b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@Value.Immutable
public interface NetstatsUrl {

Pattern NETSTATS_URL_REGEX = Pattern.compile("([-\\w]+):([\\w]+)?@([-.\\w]+)(:([\\d]+))?");
Pattern NETSTATS_URL_REGEX = Pattern.compile("([-\\w]+):([-\\w]+)?@([-.\\w]+)(:([\\d]+))?");

String getNodeName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

public class NetstatsUrlTest {

private final String VALID_NETSTATS_URL = "Dev-Node-1:[email protected]:3001";
private final String VALID_NETSTATS_URL = "Dev-Node-1:secret-with-dashes@127.0.0.1:3001";

private final String CONTACT = "[email protected]";

Expand All @@ -34,7 +34,7 @@ public void buildWithValidParams() {
assertThat(netstatsUrl.getHost()).isEqualTo("127.0.0.1");
assertThat(netstatsUrl.getNodeName()).isEqualTo("Dev-Node-1");
assertThat(netstatsUrl.getPort()).isEqualTo(3001);
assertThat(netstatsUrl.getSecret()).isEqualTo("secret");
assertThat(netstatsUrl.getSecret()).isEqualTo("secret-with-dashes");
assertThat(netstatsUrl.getContact()).isEqualTo(CONTACT);
}

Expand Down

0 comments on commit 5e4c7b6

Please sign in to comment.