Commit 8a4e7e56 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1749402, r1656549, r1840776, r1800126, r1817131, r1834226 from trunk:

Style only

Be more consistent:
   - add space between (if|while) and \(
   - place of 'break ' statement

Fix cut and paste typo in error message + remove empty lines to be consistent

follow-up to r1656549.

Instead of logging a password (which is not a good practice), clarify the associated message

* Silence compiler warning

Be less tolerant when parsing the credencial for Basic authorization. Only spaces  should be accepted after the authorization scheme. \t are also tolerated.

The current code accepts \v and \f as well.

The same behavior is already used in 'ap_get_basic_auth_pw()' which is mostly the same function as 'get_basic_auth()'.

Function used as 'apr_reslist_destructor' when calling 'apr_reslist_create()' should have the following prototype:

apr_status_t (*apr_reslist_destructor)(void *resource, void *params, apr_pool_t *pool);
Submitted by: jailletc36, rpluem, jailletc36, jailletc36
Reviewed by: jailletc36, minfrin, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1841329 13f79535-47bb-0310-9956-ffa450edef68
parent 6eb2c81b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.4.36

  *) mod_auth_basic: Be less tolerant when parsing the credencial. Only spaces
     should be accepted after the authorization scheme. \t are also tolerated.
     [Christophe Jaillet]

  *) mod_proxy_hcheck: Fix issues with interval determination. PR 62318
     [Jim Jagielski]

+0 −15
Original line number Diff line number Diff line
@@ -124,21 +124,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) Easy patches: synch 2.4.x and trunk
     - mod_sed: Style only
     - mod_auth_basic: Clarify a log message + style
     - http: Remove a compiler warning
     - mod_auth_basic: Fix parsing of the credencial for Basic authorization
     - mod_lua: fix function prototype
     trunk patch: http://svn.apache.org/r1749402
                  http://svn.apache.org/r1656549
                  http://svn.apache.org/r1840776 (follow-up to r1656549)
                  http://svn.apache.org/r1800126
                  http://svn.apache.org/r1817131
                  http://svn.apache.org/r1834226
     2.4.x patch: svn merge -c 1749402,1656549,1840776,1800126,1817131,1834226 ^/httpd/httpd/trunk . 
     +1: jailletc36, minfrin, jim

  *) mod_http2: silence compiler warnings, share less memory between
     streams/tasks, add some util fixes from mod_md copies, although not called in h2. 
     trunk patch: http://svn.apache.org/r1835118
+3 −7
Original line number Diff line number Diff line
@@ -146,14 +146,11 @@ static const char *add_basic_fake(cmd_parms * cmd, void *config,
    const char *err;

    if (!strcasecmp(user, "off")) {

        conf->fakeuser = NULL;
        conf->fakepass = NULL;
        conf->fake_set = 1;

    }
    else {

        /* if password is unspecified, set it to the fixed string "password" to
         * be compatible with the behaviour of mod_ssl.
         */
@@ -174,11 +171,10 @@ static const char *add_basic_fake(cmd_parms * cmd, void *config,
                        &err, NULL);
        if (err) {
            return apr_psprintf(cmd->pool,
                    "Could not parse fake password expression '%s': %s", user,
                    err);
                    "Could not parse fake password expression associated to user '%s': %s",
                    user, err);
        }
        conf->fake_set = 1;

    }

    return NULL;
@@ -274,7 +270,7 @@ static int get_basic_auth(request_rec *r, const char **user,
    }

    /* Skip leading spaces. */
    while (apr_isspace(*auth_line)) {
    while (*auth_line == ' ' || *auth_line == '\t') {
        auth_line++;
    }

+40 −35
Original line number Diff line number Diff line
@@ -719,9 +719,11 @@ static apr_status_t command(sed_eval_t *eval, sed_reptr_t *ipc,
                rv = wline(eval, ipc->re1, p1 - ipc->re1);
            }
            break;

        case DCOM:
            eval->delflag++;
            break;

        case CDCOM:
            p1 = eval->linebuf;

@@ -769,12 +771,11 @@ static apr_status_t command(sed_eval_t *eval, sed_reptr_t *ipc,
            eval->jflag = 1;
            break;


        case LCOM:
            p1 = eval->linebuf;
            p2 = eval->genbuf;
            eval->genbuf[72] = 0;
            while(*p1)
            while (*p1) {
                if ((unsigned char)*p1 >= 040) {
                    if (*p1 == 0177) {
                        p3 = rub;
@@ -853,6 +854,7 @@ static apr_status_t command(sed_eval_t *eval, sed_reptr_t *ipc,
                    p2--;
                    p1++;
                }
            }
            *p2 = 0;
            rv = wline(eval, eval->genbuf, strlen(eval->genbuf));
            break;
@@ -871,8 +873,8 @@ static apr_status_t command(sed_eval_t *eval, sed_reptr_t *ipc,
            }
            eval->lspend = eval->linebuf;
            eval->pending = ipc->next;

            break;

        case CNCOM:
            if (eval->aptr > eval->abuf) {
                rv = arout(eval);
@@ -886,6 +888,7 @@ static apr_status_t command(sed_eval_t *eval, sed_reptr_t *ipc,
        case PCOM:
            rv = wline(eval, eval->linebuf, eval->lspend - eval->linebuf);
            break;

        case CPCOM:
            for (p1 = eval->linebuf; *p1 != '\n' && *p1 != '\0'; p1++);
            rv = wline(eval, eval->linebuf, p1 - eval->linebuf);
@@ -906,6 +909,7 @@ static apr_status_t command(sed_eval_t *eval, sed_reptr_t *ipc,

            eval->quitflag = 1;
            break;

        case RCOM:
            if (eval->aptr >= &eval->abuf[SED_ABUFSIZE]) {
                eval_errf(eval, SEDERR_TMRMES, eval->lnum);
@@ -949,6 +953,7 @@ static apr_status_t command(sed_eval_t *eval, sed_reptr_t *ipc,
                apr_file_printf(eval->fcode[ipc->findex], "%s\n",
                                eval->linebuf);
            break;

        case XCOM:
            copy_to_genbuf(eval, eval->linebuf);
            copy_to_linebuf(eval, eval->holdbuf);
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ static apr_port_t http_port(const request_rec *r)

static int ap_process_http_async_connection(conn_rec *c)
{
    request_rec *r;
    request_rec *r = NULL;
    conn_state_t *cs = c->cs;

    AP_DEBUG_ASSERT(cs != NULL);
Loading