fixup! fix: escape error.message on login failure
This commit is contained in:
@ -60,18 +60,14 @@ describe("login", () => {
|
||||
process.env.PASSWORD = previousEnvPassword
|
||||
})
|
||||
|
||||
it("should return escaped HTML with 'Missing password' message", async () => {
|
||||
it("should return HTML with 'Missing password' message", async () => {
|
||||
const resp = await codeServer().fetch("/login", { method: "POST" })
|
||||
|
||||
expect(resp.status).toBe(200)
|
||||
|
||||
const htmlContent = await resp.text()
|
||||
|
||||
expect(htmlContent).not.toContain(">")
|
||||
expect(htmlContent).not.toContain("<")
|
||||
expect(htmlContent).not.toContain('"')
|
||||
expect(htmlContent).not.toContain("'")
|
||||
expect(htmlContent).toContain("<div class="error">Missing password</div>")
|
||||
expect(htmlContent).toContain("Missing password")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user