Skip to content

Commit

Permalink
Removed alphanumeric enforcement for node IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Wetlesen committed Jun 22, 2022
1 parent 28580bb commit 6a2f2e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docker/start
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
6 changes: 0 additions & 6 deletions graph/src/data/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit 6a2f2e7

Please sign in to comment.