Skip to content

Commit 94f3753

Browse files
committed
Restrict CSRF bootstrap exemption to GET
1 parent 1a6c705 commit 94f3753

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/edu/harvard/iq/dataverse/api/auth/AuthFilter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ private boolean isSessionCookieRequest(ContainerRequestContext containerRequestC
8686
* plus the authenticated session cookie, and do not require an existing CSRF header.
8787
*/
8888
private boolean isCsrfTokenBootstrapEndpoint(ContainerRequestContext containerRequestContext) {
89+
if (!"GET".equalsIgnoreCase(containerRequestContext.getMethod())) {
90+
return false;
91+
}
8992
String path = containerRequestContext.getUriInfo().getPath();
9093
if (path == null) {
9194
return false;

0 commit comments

Comments
 (0)