title: HP Fortify Cookie Error of Header Manipulation
body: <p>I am using Fortify to scan my code. It is identifying the error "Header Manipulation: Cookies". Further it says "includes unvalidated data in an HTTP cookie". My code is below.</p>
  
  <pre><code>String cookieName = "Foo";
  System.Text.RegularExpressions.Regex rgx = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9 -]");
  String FullCookieName = ".OmniPro" + cookieName;
  FullCookieName = rgx.Replace(FullCookieName, "");
  HttpCookie oldCookie = Request.Cookies[FullCookieName] ;
  if ( oldCookie != null )
  {
      oldCookie.Expires = DateTime.Now.AddDays( -1 );
      Response.Cookies.Add( oldCookie );
  }
  </code></pre>
  
  <p>The error is identified on "Cookies.Add".
  My intention is to just expire the old cookie. I have found no way to make Fortify happy. Any help would be appreciated.</p>