content: package com.alipay.antbenchmark.controller.cases.responseCheck;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.ResponseBody;
  
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import java.io.IOException;
  import java.util.Map;
  
  
  // assession information start
  // real vulnerability = true
  // assession project = 响应检测->响应body识别
  // compose = ResponseBodyCheck_03.java
  // bind_url = /xss/BS00033
  // assession information end
  
  
  @Controller
  @RequestMapping(value = "/xss")
  public class ResponseBodyCheck_03 extends HttpServlet {
      private static final long serialVersionUID = 1L;
  
      @ResponseBody
      @RequestMapping(value = "/BS00033", method = {RequestMethod.POST, RequestMethod.GET})
      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          response.setContentType("text/html;charset=UTF-8");
          Map<String, String[]> map = request.getParameterMap();
          String param = "";
          if (!map.isEmpty()) {
              String[] values = map.get("BS00033");
              if (values != null) {
                  param = values[0];
              }
          }
          StringBuilder sbxyz54686 = new StringBuilder(param);
          String bar = sbxyz54686.append("_SafeStuff").toString();
          response.setHeader("X-XSS-Protection", "0");
          response.getWriter().println(bar);
      }
  
  }
  