fixed csrf test and a bug

This commit is contained in:
jackiettran
2026-01-18 14:02:56 -05:00
parent f58178a253
commit f9c2057e64
2 changed files with 5 additions and 5 deletions

View File

@@ -363,7 +363,7 @@ describe('CSRF Middleware', () => {
expect(res.cookie).toHaveBeenCalledWith('csrf-token', 'mock-token-123', { expect(res.cookie).toHaveBeenCalledWith('csrf-token', 'mock-token-123', {
httpOnly: true, httpOnly: true,
secure: true, secure: false,
sameSite: 'strict', sameSite: 'strict',
maxAge: 60 * 60 * 1000 maxAge: 60 * 60 * 1000
}); });
@@ -376,7 +376,7 @@ describe('CSRF Middleware', () => {
expect(res.cookie).toHaveBeenCalledWith('csrf-token', 'mock-token-123', { expect(res.cookie).toHaveBeenCalledWith('csrf-token', 'mock-token-123', {
httpOnly: true, httpOnly: true,
secure: true, secure: false,
sameSite: 'strict', sameSite: 'strict',
maxAge: 60 * 60 * 1000 maxAge: 60 * 60 * 1000
}); });
@@ -440,7 +440,7 @@ describe('CSRF Middleware', () => {
expect(res.cookie).toHaveBeenCalledWith('csrf-token', 'mock-token-123', { expect(res.cookie).toHaveBeenCalledWith('csrf-token', 'mock-token-123', {
httpOnly: true, httpOnly: true,
secure: true, secure: false,
sameSite: 'strict', sameSite: 'strict',
maxAge: 60 * 60 * 1000 maxAge: 60 * 60 * 1000
}); });

View File

@@ -27,7 +27,7 @@ const RecoveryCodesDisplay: React.FC<RecoveryCodesDisplayProps> = ({
const handleDownload = () => { const handleDownload = () => {
if ( if (
!confirm( !window.confirm(
"Warning: This will create an unencrypted file on your device. " + "Warning: This will create an unencrypted file on your device. " +
"Consider using a password manager instead. Continue?" "Consider using a password manager instead. Continue?"
) )
@@ -48,7 +48,7 @@ const RecoveryCodesDisplay: React.FC<RecoveryCodesDisplayProps> = ({
const handlePrint = () => { const handlePrint = () => {
if ( if (
!confirm( !window.confirm(
"Warning: Printed documents can be easily compromised. " + "Warning: Printed documents can be easily compromised. " +
"Consider using a password manager instead. Continue?" "Consider using a password manager instead. Continue?"
) )