From 01be7eca6eeb44cd9cf6e34d01c77b0d632d51cf Mon Sep 17 00:00:00 2001 From: Marcus Da Coregio Date: Fri, 29 Oct 2021 09:48:24 -0300 Subject: [PATCH] Improve log message when no CSRF token found Closes gh-10436 --- .../security/web/csrf/MissingCsrfTokenException.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/main/java/org/springframework/security/web/csrf/MissingCsrfTokenException.java b/web/src/main/java/org/springframework/security/web/csrf/MissingCsrfTokenException.java index c3fa640ff5..d81e18e6c1 100644 --- a/web/src/main/java/org/springframework/security/web/csrf/MissingCsrfTokenException.java +++ b/web/src/main/java/org/springframework/security/web/csrf/MissingCsrfTokenException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,6 @@ package org.springframework.security.web.csrf; public class MissingCsrfTokenException extends CsrfException { public MissingCsrfTokenException(String actualToken) { - super("Could not verify the provided CSRF token because your session was not found."); + super("Could not verify the provided CSRF token because no token was found to compare."); } } \ No newline at end of file