1
0
mirror of synced 2026-08-06 10:18:52 +00:00

SEC-2326: CsrfRequestDataValueProcessor implements RequestDataValueProcessor

Previously there was unecessary complexity in CsrfRequestDataValueProcessor
due to the non-passive changes in RequestDataValueProcessor. Now it simply
implements the interface with the methods for both versions of the interface.
This works since linking happens at runtime.
This commit is contained in:
Rob Winch
2013-12-12 08:07:22 -06:00
parent 6f9085dd5d
commit aaa7cec32e
4 changed files with 4 additions and 59 deletions
@@ -48,6 +48,6 @@ class WebMvcSecurityConfiguration extends WebMvcConfigurerAdapter {
@Bean
public RequestDataValueProcessor requestDataValueProcessor() {
return CsrfRequestDataValueProcessor.create();
return new CsrfRequestDataValueProcessor();
}
}
@@ -59,7 +59,6 @@ public class CsrfBeanDefinitionParser implements BeanDefinitionParser {
boolean webmvcPresent = ClassUtils.isPresent(DISPATCHER_SERVLET_CLASS_NAME, getClass().getClassLoader());
if(webmvcPresent) {
RootBeanDefinition beanDefinition = new RootBeanDefinition(CsrfRequestDataValueProcessor.class);
beanDefinition.setFactoryMethodName("create");
BeanComponentDefinition componentDefinition =
new BeanComponentDefinition(beanDefinition, REQUEST_DATA_VALUE_PROCESSOR);
pc.registerBeanComponent(componentDefinition);