Experiencing problems? Have you tried our Stack Exchange first?
[X] This is not a support question.
Description of bug
when using --name parameter and the value contains word www, the regex in the code will think this is a url and return error and exit.
However we should allow user to use the word www for it's a normal word.
For the preview regex has filtered the char ., so we just need to find out the schema part.
Steps to reproduce
example:
# just www
./target/release/substrate --tmp --dev --name=www
Error: Input("Invalid node name 'www'. Reason: Node name should not contain urls. If unsure, use none.")
# contains www
./target/release/substrate --tmp --dev --name=aawww
Error: Input("Invalid node name 'aawww'. Reason: Node name should not contain urls. If unsure, use none.")
./target/release/substrate --tmp --dev --name=wwwaa
Error: Input("Invalid node name 'wwwaa'. Reason: Node name should not contain urls. If unsure, use none.")
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
when using
--name
parameter and the value contains wordwww
, the regex in the code will think this is a url and return error and exit. However we should allow user to use the wordwww
for it's a normal word.The reason is the wrong regex in function:
https://github.com/paritytech/substrate/blob/c446786a498dee7b413de101efc3c339d3eddf44/client/cli/src/commands/run_cmd.rs#L395-L414
In L407
The
\
in this part should be/\
to let regex can recognize it.Thus, it at least should be (refer to linker https://uibakery.io/regex-library/url):
For the preview regex has filtered the char
.
, so we just need to find out the schema part.Steps to reproduce
example: