PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener,
<lowprio20 gmail.com>]
+ *) mod_lua: Prevent early Lua hooks (LuaHookTranslateName and
+ LuaHookQuickHandler) from being configured in <Directory>, <Files>,
+ and htaccess where the configuration would have been ignored.
+ [Eric Covener]
+
*) mod_lua: Resolve "attempt to index local 'r' (a userdata value)" errors
in LuaMapHandler scripts [Eric Covener]
const char *file,
const char *function)
{
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES|
+ NOT_IN_HTACCESS);
+ if (err) {
+ return err;
+ }
return register_named_file_function_hook("translate_name", cmd, _cfg,
file, function);
}
static const char *register_translate_name_block(cmd_parms *cmd, void *_cfg,
const char *line)
{
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES|
+ NOT_IN_HTACCESS);
+ if (err) {
+ return err;
+ }
return register_named_block_function_hook("translate_name", cmd, _cfg,
line);
}
static const char *register_quick_hook(cmd_parms *cmd, void *_cfg,
const char *file, const char *function)
{
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES|
+ NOT_IN_HTACCESS);
+ if (err) {
+ return err;
+ }
return register_named_file_function_hook("quick", cmd, _cfg, file,
function);
}
static const char *register_quick_block(cmd_parms *cmd, void *_cfg,
const char *line)
{
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES|
+ NOT_IN_HTACCESS);
+ if (err) {
+ return err;
+ }
+
return register_named_block_function_hook("quick", cmd, _cfg,
line);
}