Commit a7ba3511 by wuwenlong

反射性XSS注入

parent e47680ef
package com.baosight.hpjx.xss; package com.baosight.hpjx.xss;
import com.baosight.iplat4j.core.web.filter.GetXssFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
public class XSSFilterConfig { public class XSSFilterConfig {
@Bean @Bean
GetXssFilter xssFilter() { XSSFilter xssFilter() {
GetXssFilter xssFilter = new GetXssFilter(); XSSFilter xssFilter = new XSSFilter();
return xssFilter; return xssFilter;
} }
@Bean @Bean
public FilterRegistrationBean xssFilterRegistrationBean(GetXssFilter xssFilter) { public FilterRegistrationBean xssFilterRegistrationBean(XSSFilter xssFilter) {
FilterRegistrationBean registrationBean = new FilterRegistrationBean(xssFilter); FilterRegistrationBean registrationBean = new FilterRegistrationBean(xssFilter);
//
registrationBean.setOrder(-105); registrationBean.setOrder(-105);
return registrationBean; return registrationBean;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment