apply security fix
Build & Push / Build & Push Docker Image (push) Failing after 3m46s

This commit is contained in:
root
2026-07-19 22:22:33 -04:00
parent ec03e783e5
commit a010ad6811
41 changed files with 626 additions and 224 deletions
+3 -3
View File
@@ -88,7 +88,7 @@ describe('dashboard middleware', () => {
expect(response).toEqual({ kind: 'redirect', url: 'https://rentaldrivego.example/dashboard/sign-in?redirect=%2Fdashboard%2Freservations' })
})
it('uses trusted forwarded host/proto when building the dashboard sign-in redirect', async () => {
it('ignores spoofed forwarded host/proto when building the dashboard sign-in redirect', async () => {
const { default: middleware } = await loadMiddleware('https://market.example.com')
const response = middleware(request('http://dashboard:3001/dashboard/billing', {
@@ -98,7 +98,7 @@ describe('dashboard middleware', () => {
},
}) as never)
expect(response).toEqual({ kind: 'redirect', url: 'https://workspace.customer.example/dashboard/sign-in?redirect=%2Fdashboard%2Fbilling' })
expect(response).toEqual({ kind: 'redirect', url: 'https://market.example.com/dashboard/sign-in?redirect=%2Fdashboard%2Fbilling' })
})
it('ignores internal forwarded hosts when building the dashboard sign-in redirect', async () => {
@@ -119,7 +119,7 @@ describe('dashboard middleware', () => {
const response = middleware(request('https://workspace.example.com/dashboard/sign-in?redirect=/dashboard/fleet', { token: 'employee-token' }) as never)
expect(response).toEqual({ kind: 'redirect', url: 'https://workspace.example.com/dashboard' })
expect(response).toEqual({ kind: 'redirect', url: 'https://market.example.com/dashboard' })
})
it('allows public dashboard auth pages without a token', async () => {