]> git.pld-linux.org Git - packages/apache1.git/commitdiff
- fix outrun of buffer when Host: header contained :port in ipv4 requests
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 16 Feb 2009 17:55:11 +0000 (17:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  src/main/http_vhost.c@fix_hostname(), bug introduced in r1.6 (4 years, 9 months ago)
  thx patrys for helping debugging this.
  as a result time to time 400 responses were given with "Client sent malformed
  Host header" in error log, depending what was in memory left from previous
  request.

Changed files:
    apache1-ipv6-PLD.patch -> 1.15

apache1-ipv6-PLD.patch

index bbf1a586c1b190a3129eca96199b21cfd34d244a..b2dfc9c20929151c6b1584c170f77ba9d6611083 100644 (file)
                    s->server_hostname =
                        ap_pstrdup(p, "bogus_host_without_reverse_dns");
                }
-@@ -664,45 +829,80 @@
+@@ -664,45 +829,81 @@
      const char *src;
      char *dst;
      const char *port_str;
 +                    }
 +                    r->parsed_uri.port_str = ap_pstrdup(r->pool, port_str);
 +                    r->parsed_uri.port = iport;
++                    break;
                  }
 -                r->parsed_uri.port_str = ap_pstrdup(r->pool, port_str);
 -                r->parsed_uri.port = iport;
      }
      /* strip trailing gubbins */
      if (dst > host && dst[-1] == '.') {
-@@ -717,7 +917,7 @@
+@@ -717,7 +918,7 @@
  bad:
      r->status = HTTP_BAD_REQUEST;
      ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
      return;
  }
  
-@@ -820,11 +1020,25 @@
+@@ -820,11 +1021,25 @@
       *   names we'll match have ports associated with them
       */
      const char *host = r->hostname;
      last_s = NULL;
  
      /* Recall that the name_chain is a list of server_addr_recs, some of
-@@ -879,7 +1093,22 @@
+@@ -879,7 +1094,22 @@
      server_rec *s;
      server_rec *last_s;
      name_chain *src;
  
      /*
       * This is in conjunction with the ServerPath code in http_core, so we
-@@ -939,10 +1168,22 @@
+@@ -939,10 +1169,22 @@
  API_EXPORT(void) ap_update_vhost_given_ip(conn_rec *conn)
  {
      ipaddr_chain *trav;
      if (trav) {
        /* save the name_chain for later in case this is a name-vhost */
        conn->vhost_lookup_data = trav->names;
-@@ -960,6 +1201,7 @@
+@@ -960,6 +1202,7 @@
        return;
      }
  
This page took 0.083208 seconds and 4 git commands to generate.