Commit 03c2fe21 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Ensure that lines in the request which are too long are

properly terminated before logging.

Submitted by:	Tsurutani Naoki <turutani scphys.kyoto-u.ac.jp>
Reviewed by:	trawick, nd, bnicholes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103680 13f79535-47bb-0310-9956-ffa450edef68
parent 9a8adc83
Loading
Loading
Loading
Loading
+4 −0
Changes for CHANGES: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
Changes with Apache 2.0.50
  *) Ensure that lines in the request which are too long are 
     properly terminated before logging.
     [Tsurutani Naoki <turutani scphys.kyoto-u.ac.jp>]
  *) Update the bind credentials for the cached LDAP connection to 
     reflect the last bind.  This prevents util_ldap from creating 
     unnecessary connections rather than reusing cached connections.
+1 −5
Changes for STATUS: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
APACHE 2.0 STATUS:                                              -*-text-*-
Last modified at [$Date: 2004/05/13 15:18:24 $]
Last modified at [$Date: 2004/05/13 23:40:02 $]

Release:

@@ -393,10 +393,6 @@ PATCHES TO BACKPORT FROM 2.1
      which integrates the two rounds of changes)
      +1 concept: trawick

    * Make sure long request lines are '\0'-terminated. (PR 28376)
      http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/protocol.c?r1=1.147&r2=1.148
      +1: trawick, nd, bnicholes

CURRENT RELEASE NOTES:

    * Backwards compatibility is expected of future Apache 2.0 releases,
+11 −0
Changes for server/protocol.c: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -250,6 +250,15 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
        /* Would this overrun our buffer?  If so, we'll die. */
        if (n < bytes_handled + len) {
            *read = bytes_handled;
            if (*s) {
                /* ensure this string is terminated */
                if (bytes_handled < n) {
                    (*s)[bytes_handled] = '\0';
                }
                else {
                    (*s)[n-1] = '\0';
                }
            }
            return APR_ENOSPC;
        }

@@ -380,6 +389,8 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
            /* Do we have enough space? We may be full now. */
                if (bytes_handled >= n) {
                    *read = n;
                    /* ensure this string is terminated */
                    (*s)[n-1] = '\0';
                    return APR_ENOSPC;
                }
                else {