mirror of
https://github.com/google/nomulus
synced 2026-01-11 00:10:36 +00:00
Add XSRF protection to legacy authentication mechanism
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=148689952
This commit is contained in:
@@ -42,6 +42,7 @@ abstract class Route {
|
||||
}
|
||||
|
||||
boolean shouldXsrfProtect(Action.Method requestMethod) {
|
||||
return action().xsrfProtection() && requestMethod != Action.Method.GET;
|
||||
return action().xsrfProtection()
|
||||
&& (requestMethod != Action.Method.GET) && (requestMethod != Action.Method.HEAD);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user