mirror of
https://github.com/unraid/api.git
synced 2026-01-08 09:39:49 -06:00
fix: generated keys should be 64 chars not 58
This commit is contained in:
@@ -97,8 +97,8 @@ export class ApiManager extends EventEmitter {
|
||||
this.replace('notifier', notifierApiKey, { userId: '-1' });
|
||||
} else {
|
||||
// Generate API keys
|
||||
const UPCFinalKey = upcApiKey ?? `unupc_${crypto.randomBytes(58).toString('hex')}`.substring(0, 58);
|
||||
const notifierFinalKey = notifierApiKey ?? `unnotify_${crypto.randomBytes(58).toString('hex')}`.substring(0, 58);
|
||||
const UPCFinalKey = upcApiKey ?? `unupc_${crypto.randomBytes(58).toString('hex')}`.substring(0, 64);
|
||||
const notifierFinalKey = notifierApiKey ?? `unnotify_${crypto.randomBytes(58).toString('hex')}`.substring(0, 64);
|
||||
|
||||
// Rebuild config file
|
||||
const data = {
|
||||
|
||||
@@ -80,10 +80,6 @@ const getAllowedOrigins = (): string[] => {
|
||||
// Get local tld
|
||||
const localTld = varState.data.localTld;
|
||||
|
||||
// Get dynamix config file
|
||||
const filePath = paths.get('myservers-config')!;
|
||||
const dynamix = loadState<{ remote: { wanport: number } }>(filePath);
|
||||
|
||||
// Get server's hostname
|
||||
const serverName = varState.data.name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user