Skip to content

Commit 34c7295

Browse files
committed
fix(connect): omit extraneous fields during connect config validation
this also prevents extraneous fields from migrating from myservers.cfg
1 parent fee7d46 commit 34c7295

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

api/dev/configs/connect.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,11 @@
22
"wanaccess": true,
33
"wanport": 8443,
44
"upnpEnabled": false,
5-
"apikey": "test-api-key-12345",
5+
"apikey": "_______________________BIG_API_KEY_HERE_________________________",
66
"localApiKey": "_______________________LOCAL_API_KEY_HERE_________________________",
77
"email": "[email protected]",
88
"username": "zspearmint",
99
"avatar": "https://via.placeholder.com/200",
1010
"regWizTime": "1611175408732_0951-1653-3509-FBA155FA23C0",
11-
"dynamicRemoteAccessType": "DISABLED",
12-
"version": "4.4.1",
13-
"extraOrigins": "https://google.com,https://test.com",
14-
"sandbox": "yes",
15-
"accesstoken": "",
16-
"idtoken": "",
17-
"refreshtoken": "",
18-
"ssoSubIds": []
19-
}
11+
"dynamicRemoteAccessType": "DISABLED"
12+
}

packages/unraid-api-plugin-connect/src/config/config.persistence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class ConnectConfigPersister extends ConfigFilePersister<MyServersConfig>
5555
enableImplicitConversion: true,
5656
});
5757
}
58-
await validateOrReject(instance);
58+
await validateOrReject(instance, { whitelist: true });
5959
return instance;
6060
}
6161

0 commit comments

Comments
 (0)