Subject: Re: Case-sensitivity of Node IDs

From: Sergey Matveev <[email-masked]>
Date: Wed, 27 Oct 2021 10:52:45 +0300

Greetings!

*** Koushik Roy [2021-10-24 16:21]:
>I was wondering if it's expected behavior for node IDs to _have_ to be upper-case.

You can specify node ID either by its Base32-encoded representation, or
by its alias human-readable name, as it appears in configuration file
(like "self" for example, existing out of box). Human-readable ids have
to be passed as-is as they are written in configuration -- they are case
sensitive. Non-human-readable ids have to be passed as-is too. Base32
encoding uses uppercase alphabet characters.

So, ids just have to be passed as-is. Base32 is upper-case. I wonder who
and how mangle those ids? One just should not alter ids anyhow. Because
raw Base32 encoded ids are not indented for humans, they should be
copy-pasted/used as-is, not mangled by scripts. I think it would be
excess note that "node ids have to be passed as-is", because in my
opinion it should be assumed by default.

If I passed invalid case in Base32 encoded id, then utility will give:
    main.go:119: Invalid NODE specified: Can not parse node: 2W...Bq: illegal base32 data at input byte 51
that explicitly tells about wrong encoding format.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF