mirror of
https://github.com/google/nomulus
synced 2026-04-28 11:57:11 +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:
@@ -17,6 +17,7 @@ package google.registry.request.auth;
|
||||
import static google.registry.request.auth.AuthLevel.APP;
|
||||
import static google.registry.request.auth.AuthLevel.NONE;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
@@ -56,6 +57,9 @@ public class AppEngineInternalAuthenticationMechanism implements AuthenticationM
|
||||
// As defined in the App Engine request header documentation.
|
||||
private static final String QUEUE_NAME_HEADER = "X-AppEngine-QueueName";
|
||||
|
||||
@Inject
|
||||
public AppEngineInternalAuthenticationMechanism() {}
|
||||
|
||||
@Override
|
||||
public AuthResult authenticate(HttpServletRequest request) {
|
||||
if (request.getHeader(QUEUE_NAME_HEADER) == null) {
|
||||
|
||||
Reference in New Issue
Block a user