From 1bd684d69cfbf8670d39c85783eb361cb45ce592 Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Sat, 21 Jun 2014 11:21:04 +0000 Subject: [PATCH] mod_lua: Backport disabling of early/late in LuaHookCheckUserID git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1604340 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ modules/lua/mod_lua.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 889345f39e..2f8bf7ab8d 100644 --- a/CHANGES +++ b/CHANGES @@ -136,6 +136,9 @@ Changes with Apache 2.4.10 to prevent HTTP Response Splitting via tainted headers. [Daniel Gruno, Felipe Daragon ] + *) mod_lua: Remove the non-working early/late arguments for + LuaHookCheckUserID. [Daniel Gruno] + *) mod_lua: Change IVM storage to use shm [Daniel Gruno] *) mod_lua: More verbose error logging when a handler function cannot be diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c index 2f18a47da8..d0ffbdb361 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -1338,7 +1338,7 @@ static const char *register_check_user_id_hook(cmd_parms *cmd, void *_cfg, const char *when) { int apr_hook_when = APR_HOOK_MIDDLE; - +/* XXX: This does not currently work!! if (when) { if (!strcasecmp(when, "early")) { apr_hook_when = AP_LUA_HOOK_FIRST; @@ -1350,7 +1350,7 @@ static const char *register_check_user_id_hook(cmd_parms *cmd, void *_cfg, return "Third argument must be 'early' or 'late'"; } } - +*/ return register_named_file_function_hook("check_user_id", cmd, _cfg, file, function, apr_hook_when); } @@ -2093,14 +2093,16 @@ static void lua_register_hooks(apr_pool_t *p) ap_hook_map_to_storage(lua_map_to_storage_harness, NULL, NULL, APR_HOOK_MIDDLE); - ap_hook_check_user_id(lua_check_user_id_harness_first, NULL, NULL, +/* XXX: Does not work :( + * ap_hook_check_user_id(lua_check_user_id_harness_first, NULL, NULL, AP_LUA_HOOK_FIRST); - + */ ap_hook_check_user_id(lua_check_user_id_harness, NULL, NULL, APR_HOOK_MIDDLE); - ap_hook_check_user_id(lua_check_user_id_harness_last, NULL, NULL, +/* XXX: Does not work :( + * ap_hook_check_user_id(lua_check_user_id_harness_last, NULL, NULL, AP_LUA_HOOK_LAST); - +*/ ap_hook_type_checker(lua_type_checker_harness, NULL, NULL, APR_HOOK_MIDDLE); -- 2.50.1