variables during expression evaluation to avoid a crash. If not return
an empty string.
PR: 57070
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1630947 13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_ssl: Do not crash when looking up SSL related variables during
+ expression evaluation on non SSL connections. PR 57070 [Ruediger Pluem]
+
*) core: Ensure that httpd exits with an error status when the MPM fails
to run. [Yann Ylavic]
static const char *expr_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
{
char *var = (char *)data;
- return ssl_var_lookup_ssl(ctx->p, ctx->c, ctx->r, var);
+ SSLConnRec *sslconn = myConnConfig(ctx->c);
+
+ return sslconn ? ssl_var_lookup_ssl(ctx->p, ctx->c, ctx->r, var) : "";
}
static int ssl_expr_lookup(ap_expr_lookup_parms *parms)