View | Details | Raw Unified | Return to bug 52439
Collapse All | Expand All

(-)httpd/server/core.c (-3 / +28 lines)
Lines 1971-1983 Link Here
1971
            all_none = 1;
1971
            all_none = 1;
1972
        }
1972
        }
1973
        else {
1973
        else {
1974
            return apr_pstrcat(cmd->pool, "Illegal option ", w, NULL);
1974
            if (cmd->override & NONFATAL_UNKNOWN) {
1975
                opt = 0;
1976
                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, "Unknown Option %s in line %d of %s.",
1977
                    w, cmd->directive->line_num, cmd->directive->filename);
1978
            } else {
1979
                return apr_pstrcat(cmd->pool, "Illegal option ", w, NULL);
1980
            }
1975
        }
1981
        }
1976
1982
1977
        if ( (cmd->override_opts & opt) != opt ) {
1983
        if ( (cmd->override_opts & opt) != opt ) {
1978
            return apr_pstrcat(cmd->pool, "Option ", w, " not allowed here", NULL);
1984
            if (cmd->override & NONFATAL_OVERRIDE) {
1985
                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, "Option %s not allowed in line %d of %s.",
1986
                    w, cmd->directive->line_num, cmd->directive->filename);
1987
1988
                /* special case for Options All, we might want to enable every possible (and allowed) parameter */
1989
                if (opt != OPT_ALL) {
1990
                    first = 0;
1991
                    continue;
1992
                } else {
1993
                    /*
1994
                     * OPT_ALL doesnt include OPT_SYM_OWNER but its important to enable that one too
1995
                     * also take in mind that Options All does not have + or - so it'll be added to the already enabled options
1996
                     * this means it'll enable everything that is allowed to be overriden
1997
                     */
1998
                    opt = (OPT_ALL | OPT_SYM_OWNER) & cmd->override_opts;
1999
                }
2000
            } else {
2001
                return apr_pstrcat(cmd->pool, "Option ", w, " not allowed here", NULL);
2002
            }
1979
        }
2003
        }
1980
        else if (action == '-') {
2004
2005
        if (action == '-') {
1981
            /* we ensure the invariant (d->opts_add & d->opts_remove) == 0 */
2006
            /* we ensure the invariant (d->opts_add & d->opts_remove) == 0 */
1982
            d->opts_remove |= opt;
2007
            d->opts_remove |= opt;
1983
            d->opts_add &= ~opt;
2008
            d->opts_add &= ~opt;

Return to bug 52439