Merge remote-tracking branch 'origin/main' into feat/yucca-integration

This commit is contained in:
izzy
2026-04-16 14:41:49 +01:00
19 changed files with 140 additions and 132 deletions
+3 -3
View File
@@ -93,7 +93,7 @@
"mnemonist": "^0.40.3",
"multer": "^2.0.2",
"nest-commander": "^3.16.0",
"nestjs-cls": "^5.0.0",
"nestjs-cls": "^6.0.0",
"nestjs-kysely": "3.1.2",
"nestjs-otel": "^7.0.0",
"nestjs-zod": "^5.3.0",
@@ -142,8 +142,8 @@
"@types/luxon": "^3.6.2",
"@types/mock-fs": "^4.13.1",
"@types/multer": "^2.0.0",
"@types/node": "^24.12.0",
"@types/nodemailer": "^7.0.0",
"@types/node": "^24.12.2",
"@types/nodemailer": "^8.0.0",
"@types/picomatch": "^4.0.0",
"@types/pngjs": "^6.0.5",
"@types/react": "^19.0.0",
+6 -1
View File
@@ -181,7 +181,12 @@ const SystemConfigOAuthSchema = z
timeout: z.int().min(1).describe('Timeout'),
defaultStorageQuota: z.number().min(0).nullable().describe('Default storage quota'),
enabled: configBool.describe('Enabled'),
issuerUrl: z.string().describe('Issuer URL'),
issuerUrl: z
.string()
.refine((url) => url.length === 0 || z.url().safeParse(url).success, {
error: 'Issuer URL must be an empty string or a valid URL',
})
.describe('Issuer URL'),
scope: z.string().describe('Scope'),
signingAlgorithm: z.string().describe('Signing algorithm'),
profileSigningAlgorithm: z.string().describe('Profile signing algorithm'),
@@ -307,6 +307,15 @@ describe(SystemConfigService.name, () => {
});
});
it('should reject an invalid issuer URL', async () => {
mocks.config.getEnv.mockReturnValue(mockEnvData({ configFile: 'immich-config.json' }));
mocks.systemMetadata.readFile.mockResolvedValue(JSON.stringify({ oauth: { issuerUrl: 'accounts.google.com' } }));
await expect(sut.getSystemConfig()).rejects.toThrow(
'[oauth.issuerUrl] Issuer URL must be an empty string or a valid URL',
);
});
it('should reject invalid cron expressions', async () => {
mocks.config.getEnv.mockReturnValue(mockEnvData({ configFile: 'immich-config.json' }));
mocks.systemMetadata.readFile.mockResolvedValue(JSON.stringify({ library: { scan: { cronExpression: 'foo' } } }));