diff --git a/core/src/main/java/hudson/security/csrf/CrumbIssuer.java b/core/src/main/java/hudson/security/csrf/CrumbIssuer.java index e45331774509..491ec735b591 100644 --- a/core/src/main/java/hudson/security/csrf/CrumbIssuer.java +++ b/core/src/main/java/hudson/security/csrf/CrumbIssuer.java @@ -99,7 +99,7 @@ public String getCrumb(ServletRequest request) { */ @Deprecated public String getCrumb(javax.servlet.ServletRequest request) { - return getCrumb(request != null ? ServletRequestWrapper.toJakartaServletRequest(request) : null); + return getCrumb(request != null ? wrap(request) : null); } /** @@ -211,7 +211,7 @@ private static javax.servlet.ServletRequest wrap(@NonNull ServletRequest request @Deprecated public boolean validateCrumb(javax.servlet.ServletRequest request, String salt, String crumb) { return Util.ifOverridden( - () -> validateCrumb(request != null ? ServletRequestWrapper.toJakartaServletRequest(request) : null, salt, crumb), + () -> validateCrumb(request != null ? wrap(request) : null, salt, crumb), CrumbIssuer.class, getClass(), "validateCrumb",