title: How do I fix Open Redirect Security Vulnerability in JavaScript?
body: <p>Fortify Scan reports an 'Open Redirect' security vulnerability in </p>
  
  <pre><code>window.open(strUrl,"_blank", features)
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>var features = "status=no, toolbar=no, menubar=no, location=no, top=20, left=175, height=500, width=750";
  
  var strURL = ADMIN_TOOL_SNOOP + "?machineName=" + strMachine + "&amp;template=snoop" +"&amp;context=DEBUG&amp;date=" + strDate.replace(regExp, "");
  
  var validateStrURL =  new RegExp("/^[.\\p{Alnum}\\p{Space}]{0,1024}+/", "g");
  if(validateStrURL.test(strURL))
  {
    if((strURL != null)&amp;&amp;(strURL.length !=0)&amp;&amp;(strURL.length &lt;= 200) )
    {
      window.open(strURL,"_blank",features);
    }
  }
  </code></pre>
  
  <p>How do I fix it?</p>