This happens on OSX, it's not clear if it happens on other OS's as well.
When SD generates a new config, it sometimes generates a short password instead of it being 10 chars:
```
# Autogenerated by Hush SilentDragonX 1.3.1 https://dragonx.is
server=1
rpcpassword=OU
rpcuser=dragonx
rpcport=21769
...
```
The bug seems to be in connection.cpp on the line :
```
s[i] = alphanum[randombytes_uniform(sizeof(alphanum))];
```
because `s` is a `char *` (8 bit) but `randombytes_uniform` returns a `uint32_t` value according to https://doc.libsodium.org/generating_random_data
This happens on OSX, it's not clear if it happens on other OS's as well.
When SD generates a new config, it sometimes generates a short password instead of it being 10 chars:
The bug seems to be in connection.cpp on the line :
because
s
is achar *
(8 bit) butrandombytes_uniform
returns auint32_t
value according to https://doc.libsodium.org/generating_random_dataThis happens on OSX, it's not clear if it happens on other OS's as well.
Attempt at a fix on the
dragonx
branch :a557e25b61
needs testing
Seems to work as expected on OSX and Windows. Created 32 char password 10/10 times when deleting config and letting SD generate a new config.
This is fixed on the
dev
branch, closing