Closed remicorniere closed 3 years ago
Bonjour @remicorniere,
My first guess is machine names must be ASCII, but I'm investigating. (If that's the case, then we should at least give a warning.)
Yes, the machine name must contain only "printable" characters, as checked by https://en.cppreference.com/w/c/string/byte/isprint. Unfortunately that function's behaviour varies by locale, but I'm 95% confident that we're using the "C" locale (I'm still investigating). So yes, you can only use typical ASCII characters.
I should definitely add this to our docs, as well as adding a sanity check in keygen/keygen_actual.c
. Thanks for the report!
Yes, right now it's limited to printable 7-bit ASCII characters. We should probably change that, but I don't know if all of the code which handles machine names is able to safely handle UTF-8... I'll keep this in mind the next time I revisit that code. In the mean time, as @gperciva says, we should just document and error out in the utility rather than sending a request which the server will reject.
Thanks for the replies, and thanks for tarsnap ! :)
This was fixed back in April in https://github.com/Tarsnap/tarsnap/pull/479, and will be part of the next tarsnap release.
Hello !
I came across a weird bug it seems. I tried to generate a key with the following command:
And I got this:
which I eventually killed.
I tried pinging the server with this, and it worked:
Then I tried simply changing the machine name to:
and it worked.
Is it possible that the machine name cannot have accents (UTF-8 chars, more widely) ? Sorry if it's in the docs and I missed it.