Commit 13546ba9 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1716940, r1717086 from trunk:

Use 'ap_pbase64decode' to simplify code.

Silent a sparse Warning.

cid->ecb->lpszLogData can not be NULL.
It is defined in mod_isapi.h as:
typedef struct EXTENSION_CONTROL_BLOCK {
...
    char           lpszLogData[80];
...
Submitted by: jailletc36
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1718332 13f79535-47bb-0310-9956-ffa450edef68
parent ca5c6e8c
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -112,14 +112,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]


  *) Easy patches: synch 2.4.x and trunk
     - mod_auth_basic: Use 'ap_pbase64decode' to simplify code.
     - mod_isapi: Silent a sparse Warning.
     trunk patch: http://svn.apache.org/r1716940
                  http://svn.apache.org/r1717086
     2.4.x patch: trunk patches work
     +1: jailletc36, ylavic, jim

  *) mod_ssl: Save a few bytes in conf pool.
     trunk patch: http://svn.apache.org/r1715273
     2.4.x patch: trunk patches work
+1 −5
Original line number Diff line number Diff line
@@ -254,7 +254,6 @@ static int get_basic_auth(request_rec *r, const char **user,
{
    const char *auth_line;
    char *decoded_line;
    int length;

    /* Get the appropriate header */
    auth_line = apr_table_get(r->headers_in, (PROXYREQ_PROXY == r->proxyreq)
@@ -279,10 +278,7 @@ static int get_basic_auth(request_rec *r, const char **user,
        auth_line++;
    }

    decoded_line = apr_palloc(r->pool, apr_base64_decode_len(auth_line) + 1);
    length = apr_base64_decode(decoded_line, auth_line);
    /* Null-terminate the string. */
    decoded_line[length] = '\0';
    decoded_line = ap_pbase64decode(r->pool, auth_line);

    *user = ap_getword_nulls(r->pool, (const char**)&decoded_line, ':');
    *pw = decoded_line;
+2 −1
Original line number Diff line number Diff line
@@ -1582,9 +1582,10 @@ static apr_status_t isapi_handler (request_rec *r)
    rv = (*isa->HttpExtensionProc)(cid->ecb);

    /* Check for a log message - and log it */
    if (cid->ecb->lpszLogData && *cid->ecb->lpszLogData)
    if (*cid->ecb->lpszLogData) {
        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02113)
                      "%s: %s", r->filename, cid->ecb->lpszLogData);
    }

    switch(rv) {
        case 0:  /* Strange, but MS isapi accepts this as success */