From 6a2f2e729a601f1201411466ca32212793cf665c Mon Sep 17 00:00:00 2001 From: Kai Wetlesen Date: Tue, 21 Jun 2022 22:27:27 -0700 Subject: [PATCH] Removed alphanumeric enforcement for node IDs --- docker/start | 4 ++-- graph/src/data/store/mod.rs | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docker/start b/docker/start index 4be9875ad59..30b1bcef09c 100755 --- a/docker/start +++ b/docker/start @@ -57,7 +57,7 @@ run_graph_node() { wait_for_ipfs "$ipfs" sleep 5 graph-node \ - --node-id "${node_id//-/_}" \ + --node-id "$node_id" \ --config "$GRAPH_NODE_CONFIG" \ --ipfs "$ipfs" else @@ -70,7 +70,7 @@ run_graph_node() { sleep 5 graph-node \ - --node-id "${node_id//-/_}" \ + --node-id "$node_id" \ --postgres-url "$postgres_url" \ --ethereum-rpc $ethereum \ --ipfs "$ipfs" diff --git a/graph/src/data/store/mod.rs b/graph/src/data/store/mod.rs index 773d2425c63..678fe42eaf6 100644 --- a/graph/src/data/store/mod.rs +++ b/graph/src/data/store/mod.rs @@ -68,12 +68,6 @@ impl NodeId { return Err(()); } - // Check that the ID contains only allowed characters. - // Note: these restrictions are relied upon to prevent SQL injection - if !s.chars().all(|c| c.is_ascii_alphanumeric() || c == '_') { - return Err(()); - } - Ok(NodeId(s)) }