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 <simon.dudley@consensys.net>
  • Loading branch information
siladu authored and jframe committed Feb 17, 2023
1 parent 0c13a7f commit 28b7b6d
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:secret@127.0.0.1:3001";
private final String VALID_NETSTATS_URL = "Dev-Node-1:secret-with-dashes@127.0.0.1:3001";

private final String CONTACT = "contact@mail.fr";

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 28b7b6d

Please sign in to comment.