mirror of
https://github.com/unraid/api.git
synced 2026-02-07 16:38:49 -06:00
fix(connect): omit extraneous fields during connect config validation (#1538)
Prevent extraneous fields from migrating to `connect.json` from `myservers.cfg`
This commit is contained in:
@@ -2,18 +2,11 @@
|
||||
"wanaccess": true,
|
||||
"wanport": 8443,
|
||||
"upnpEnabled": false,
|
||||
"apikey": "test-api-key-12345",
|
||||
"apikey": "_______________________BIG_API_KEY_HERE_________________________",
|
||||
"localApiKey": "_______________________LOCAL_API_KEY_HERE_________________________",
|
||||
"email": "test@example.com",
|
||||
"username": "zspearmint",
|
||||
"avatar": "https://via.placeholder.com/200",
|
||||
"regWizTime": "1611175408732_0951-1653-3509-FBA155FA23C0",
|
||||
"dynamicRemoteAccessType": "DISABLED",
|
||||
"version": "4.4.1",
|
||||
"extraOrigins": "https://google.com,https://test.com",
|
||||
"sandbox": "yes",
|
||||
"accesstoken": "",
|
||||
"idtoken": "",
|
||||
"refreshtoken": "",
|
||||
"ssoSubIds": []
|
||||
}
|
||||
"dynamicRemoteAccessType": "DISABLED"
|
||||
}
|
||||
@@ -55,7 +55,7 @@ export class ConnectConfigPersister extends ConfigFilePersister<MyServersConfig>
|
||||
enableImplicitConversion: true,
|
||||
});
|
||||
}
|
||||
await validateOrReject(instance);
|
||||
await validateOrReject(instance, { whitelist: true });
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user