mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-19 05:26:54 +02:00
fix a couple of cases of writing the wrong token
This commit is contained in:
parent
27cc1b2301
commit
dc23957872
1 changed files with 2 additions and 2 deletions
|
@ -978,8 +978,8 @@ public:
|
|||
Utils::getSecureRandom(foo,sizeof(foo));
|
||||
_metricsToken = "";
|
||||
for(unsigned int i=0;i<sizeof(foo);++i)
|
||||
_authToken.push_back("abcdefghijklmnopqrstuvwxyz0123456789"[(unsigned long)foo[i] % 36]);
|
||||
if (!OSUtils::writeFile(metricsTokenPath.c_str(),_authToken)) {
|
||||
_metricsToken.push_back("abcdefghijklmnopqrstuvwxyz0123456789"[(unsigned long)foo[i] % 36]);
|
||||
if (!OSUtils::writeFile(metricsTokenPath.c_str(),_metricsToken)) {
|
||||
Mutex::Lock _l(_termReason_m);
|
||||
_termReason = ONE_UNRECOVERABLE_ERROR;
|
||||
_fatalErrorMessage = "metricstoken.secret could not be written";
|
||||
|
|
Loading…
Add table
Reference in a new issue