content: package com.alipay.antbenchmark.controller.cases.modificationAbility.urlParam;
  
  import org.owasp.esapi.ESAPI;
  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.Locale;
  
  
  // assession information start
  // real vulnerability = fasle
  // bind_url = /xss/BS00028
  // assession information end
  
  
  @Controller
  @RequestMapping(value = "/xss")
  public class UrlValue_03 extends HttpServlet {
      private static final long serialVersionUID = 1L;
  
      @ResponseBody
      @RequestMapping(value = "/BS00028", method = {RequestMethod.POST, RequestMethod.GET})
      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          response.setContentType("text/html;charset=UTF-8");
          String param = request.getParameter("BS00028");
          if (param == null) {
              param = "";
          }
          String bar = ESAPI.encoder().encodeForHTML(param);
          response.setHeader("X-XSS-Protection", "0");
          Object[] obj = {"a", bar};
          response.getWriter().printf(Locale.US, "Formatted like: %1$s and %2$s.", obj);
      }
  
  }
  