Commit 8dd8d292 authored by Graham Leggett's avatar Graham Leggett
Browse files

mod_include: The SSIAccessEnable directive existed to ensure the addition

of the "-A" syntax would not break existing configurations in v2.2. Remove
the directive for v2.4, defaulting the behaviour to enabled.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204183 13f79535-47bb-0310-9956-ffa450edef68
parent 897b9b4d
Loading
Loading
Loading
Loading
+4 −40
Changes for docs/manual/mod/mod_include.xml: 4 added lines, 40 removed lines.
Original line number Diff line number Diff line
@@ -619,12 +619,10 @@

      <dt><code><var>-A string</var></code></dt>
      <dd><p>true if the URL represented by the string is accessible by
      configuration, false otherwise. This test only has an effect if
      <directive>SSIAccessEnable</directive> is on. This is useful
      where content on a page is to be hidden from users who are not
      authorized to view the URL, such as a link to that URL. Note
      that the URL is only tested for whether access would be granted,
      not whether the URL exists.</p>
      configuration, false otherwise. This is useful where content on a
      page is to be hidden from users who are not authorized to view the
      URL, such as a link to that URL. Note that the URL is only tested
      for whether access would be granted, not whether the URL exists.</p>

      <example><title>Example</title>
        &lt;!--#if expr="-A /private" --&gt;<br />
@@ -886,40 +884,6 @@ displayed</description>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>SSIAccessEnable</name>
<description>Enable the -A flag in legacy conditional expressions.</description>
<syntax>SSIAccessEnable on|off</syntax>
<default>SSIAccessEnable off</default>
<contextlist><context>directory</context><context>.htaccess</context></contextlist>

<usage>
    <note><directive>SSIAccessEnable</directive> has no effect unless
    <directive module="mod_include">SSILegacyExprParser</directive> is set to
    <code>on</code>.
    </note>

    <p>The <directive>SSIAccessEnable</directive> directive controls whether
    the -A test is enabled during conditional flow control processing when
    using the 2.2.x compatible expression parser.
    <directive>SSIAccessEnable</directive> can take on the following values:</p>

    <dl>

      <dt><code>off</code></dt>
      <dd>&lt;!--#if expr="-A /foo"--&gt; will be interpreted as a series
      of string and regular expression tokens, the -A has no special
      meaning.</dd>

      <dt><code>on</code></dt>
      <dd>&lt;!--#if expr="-A /foo"--&gt; will evaluate to false if the
      URL /foo is inaccessible by configuration, or true otherwise.</dd>

    </dl>

</usage>
</directivesynopsis>

<directivesynopsis>
<name>SSIETag</name>
<description>Controls whether ETags are generated by the server.</description>
+1 −9
Changes for modules/filters/mod_include.c: 1 added line, 9 removed lines.
Original line number Diff line number Diff line
@@ -117,7 +117,6 @@ typedef struct {
    const char *default_time_fmt;
    const char *undefined_echo;
    xbithack_t  xbithack;
    signed char accessenable;
    signed char lastmodified;
    signed char etag;
    signed char legacy_expr;
@@ -197,7 +196,6 @@ struct ssi_internal_ctx {
    const char   *undefined_echo;
    apr_size_t    undefined_echo_len;

    char         accessenable;    /* is using the access tests allowed? */
    char         legacy_expr;     /* use ap_expr or legacy mod_include
                                    expression parser? */

@@ -1076,7 +1074,7 @@ static int get_ptoken(include_ctx_t *ctx, const char **parse, token_t *token, to
        TYPE_TOKEN(token, TOKEN_LT);
        return 0;
    case '-':
        if (**parse == 'A' && (ctx->intern->accessenable)) {
        if (**parse == 'A') {
            TYPE_TOKEN(token, TOKEN_ACCESS);
            ++*parse;
            return 0;
@@ -3834,7 +3832,6 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
        if ((ap_allow_options(r) & OPT_INC_WITH_EXEC) == 0) {
            ctx->flags |= SSI_FLAG_NO_EXEC;
        }
        intern->accessenable = (conf->accessenable > 0);
        intern->legacy_expr = (conf->legacy_expr > 0);
        intern->expr_eval_ctx = NULL;
        intern->expr_err = NULL;
@@ -3995,7 +3992,6 @@ static void *create_includes_dir_config(apr_pool_t *p, char *dummy)
    include_dir_config *result = apr_pcalloc(p, sizeof(include_dir_config));

    result->xbithack          = XBITHACK_UNSET;
    result->accessenable      = UNSET;
    result->lastmodified      = UNSET;
    result->etag              = UNSET;
    result->legacy_expr       = UNSET;
@@ -4013,7 +4009,6 @@ static void *merge_includes_dir_config(apr_pool_t *p, void *basev, void *overrid
    MERGE(base, over, new, default_time_fmt,  NULL);
    MERGE(base, over, new, undefined_echo,    NULL);
    MERGE(base, over, new, xbithack,          XBITHACK_UNSET);
    MERGE(base, over, new, accessenable,      UNSET);
    MERGE(base, over, new, lastmodified,      UNSET);
    MERGE(base, over, new, etag,              UNSET);
    MERGE(base, over, new, legacy_expr,       UNSET);
@@ -4165,9 +4160,6 @@ static const command_rec includes_cmds[] =
                  "SSI End String Tag"),
    AP_INIT_TAKE1("SSIUndefinedEcho", set_undefined_echo, NULL, OR_ALL,
                  "String to be displayed if an echoed variable is undefined"),
    AP_INIT_FLAG("SSIAccessEnable", ap_set_flag_slot_char,
                  (void *)APR_OFFSETOF(include_dir_config, accessenable),
                  OR_LIMIT, "Whether testing access is enabled. Limited to 'on' or 'off'"),
    AP_INIT_FLAG("SSILegacyExprParser", ap_set_flag_slot_char,
                  (void *)APR_OFFSETOF(include_dir_config, legacy_expr),
                  OR_LIMIT,