669044339c3ce6a0bf9d2ad18c2c84f97dbf677e 1668827 |
|
24-Mar-2015 |
jkaluza |
* mod_lua: fix compilation with lua-5.3 |
334b2ed102b01c5710b883924c16e3a78287327c 1642499 |
|
30-Nov-2014 |
covener |
*) SECURITY: CVE-2014-8109 (cve.mitre.org)
mod_lua: Fix handling of the Require line when a LuaAuthzProvider is
used in multiple Require directives with different arguments.
PR57204 [Edward Lu <Chaosed0 gmail.com>]
Submitted By: Edward Lu
Committed By: covener |
b2c17021012bc4f7cd8e374c6bd72b926737320f 1612068 |
|
20-Jul-2014 |
jailletc36 |
Add missing APLOGNO.
Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
Split lines longer than 80.
Improve alignment. |
c1ac90590ccef4c87fc3dd3995ea45983626016d 1606836 |
|
30-Jun-2014 |
breser |
mod_lua: Remove dead code left over from the old code cache.
The code that used this was commented out in r721594, then removed entirely in
r728497, and finally a commit was made intending to remove the last traces of
the code cache in r1200513, but this initialization lived on anyway.
* modules/lua/mod_lua.c
(create_server_config): Remove unused empty hash and rwlock for hash.
* modules/lua/mod_lua.h
(ap_lua_server_cfg): Remove unneeded hash and rwlock entries.
Found by: Bert Huijben <rhuijben{_at_}collab.net> |
fb4dfbda7a87d7a102c5b754b87b118323cf573a 1604631 |
|
22-Jun-2014 |
trawick |
Follow up to r1604336: Comment out hooks whose only references are
now commented out, fixing a "-Wunused-function" warning |
bbea49a18ce007bec54752959032aff7f709b879 1604336 |
|
21-Jun-2014 |
humbedooh |
Revert early|late argument for LuaHookCheckUserID as it does not work right now. |
831a7b421bb4e7b2764eacb7459f9bf7af9be68b 1582247 |
|
27-Mar-2014 |
humbedooh |
mod_lua: Reformat and escape script error output. |
d51365e291806b8b73a09044000cde6ab2ecdfc3 1578825 |
|
18-Mar-2014 |
humbedooh |
mod_lua: be a bit more verbose in error logging. |
8d92cc1b2f31241ae908c609082c244d1f3cc34c 1576981 |
|
12-Mar-2014 |
humbedooh |
mod_lua: Add a fixups hook that checks if the original request is intended for LuaMapHandler. This fixes a bug where FallbackResource invalidates the LuaMapHandler directive in certain cases by changing the URI before the map handler code executes. |
f183a235edd3d7d38a05d7371838d5fad8735372 1551010 |
|
15-Dec-2013 |
jailletc36 |
'ap_getword_conf' can not return NULL |
7934a4aca00749a911fade4a5f67a5964f8ad0fc 1527063 |
|
27-Sep-2013 |
covener |
r1526906 followup:
error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] |
001a44c352f89c9ec332ffd3e0a6927dcd19432c 1526906 |
|
27-Sep-2013 |
humbedooh |
mod_lua: Use a (new) global pool/mutex setup for IVM rather than a per-process pool. |
921d32d80d8271da08f12fc374a69cb36d1d63b3 1519492 |
|
02-Sep-2013 |
covener |
mod_lua: If the first yield() of a LuaOutputFilter returns a string, it should
be prefixed to the response as documented.
Also, don't put empty heap buckets in the brigade if a yield() is called with
no string. |
3e097af23e40c45aa32602545155f0964ab5c69d 1519483 |
|
02-Sep-2013 |
covener |
mod_lua: Remove ETAG, Content-Length, and Content-MD5 when a LuaOutputFilter
is configured without mod_filter. [Eric Covener] |
faea99bb676ec50ece38da6b1879aa37546483a2 1519476 |
|
02-Sep-2013 |
covener |
register LuaOutputFilters with AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH |
344f755169e100ea8ce51e847a0bf30a13b46917 1519398 |
|
02-Sep-2013 |
covener |
Return a 500 error instead of DECLINED when LuaHook* script does not
return a numeric value. |
39bc081dc9508627ef73a4f4f277a847c09311d4 1519329 |
|
02-Sep-2013 |
covener |
trace4 logging of return codes from LuaHook* functions. |
cc51a7f7ad87c5cc2e0dd1eb4898f3ab9fe16119 1519277 |
|
01-Sep-2013 |
humbedooh |
Adding a simple logging hook for mod_lua, which allows users to create their own logs or bypass the generic logging on a per-request basis. |
df6d5653669f1514b4449aaba99cb950c0013e5f 1490098 |
|
06-Jun-2013 |
covener |
tolerate LuaMapHandler scripts that don't return anything |
58921879276ee6952fe82fdb39e48aed284eceff 1488114 |
|
31-May-2013 |
fuankg |
Remove unneeded exports from mod_lua - part 2. |
87fcce863957bd192299b6bd1f1979f1d2ce2908 1470156 |
|
20-Apr-2013 |
humbedooh |
Use a mutex to control read/write for IVM values, so we can reuse the existing structures without running into race conditions.
This should get rid of the need to have MaxConnectionsPerChild set to > 0.
If a new value is set and is a string, we either use the existing varbuf or grow it accordingly. |
748982bb948086d4e34e62bb731a0de8ae4f4aa5 1433967 |
|
16-Jan-2013 |
humbedooh |
Using the traditional way of declaring Lua functions does not seem to work with NetWare (and possibly Windows too?)
Thus, at least until we find a smarter way, we have to move the r:* functions into lua_request.c and connect them from there.
The only functional change is that the transferred functions are now called through the request object instead of the apache2 package.
The distinction between what merited it to be in either structure seems very vague, so for now, we'll keep the HTTP return codes in the apache2 table, and the request/server functions in the request object. |
bcc8cf07e157c4737ff564ac943c21b9a7da3691 1422373 |
|
15-Dec-2012 |
humbedooh |
mod_lua: If a regex fails, return false plus an error message as second return value. Also fix some functions who weren't always returning a value. |
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2 1420377 |
|
11-Dec-2012 |
humbedooh |
mod_lua: Add a lot of core httpd/apr functionality to mod_lua
(such as regex matching, expr evaluation, changing/fetching server configuration/info - see docs for a complete list).
This also includes a bunch of automatically scraped functions, which may or may not be super useful.
Comments appreciated as always, especially on the more hacky bits. |
19a96e59a4250d39c542c58782b5aa06d10d03f1 1383028 |
|
10-Sep-2012 |
sf |
more coding style (no logic change) |
a6bcf98c8b3a9b16dd9eb1487645cae8fd842095 1383022 |
|
10-Sep-2012 |
sf |
Fix warnings about unused variable and (false positive) "'mkey' may be used uninitialized in this function" |
8ef30b572f5cee245f1dd27860e9a4c7d5f375cd 1383013 |
|
10-Sep-2012 |
sf |
Replace duplicate log msg numbers |
2d8f5dcd8dd3bb3be936f6aae9ea125691247ccd 1377685 |
|
27-Aug-2012 |
humbedooh |
Trying to tie up some loose ends:
- Return immediately if the return val of ap_pass_brigade != APR_SUCCESS
- Return a bit earlier when dealing with input filters, so as to not build up a huge backlog. |
ffb1f36366edefb7e15b6f80893e09d2d6a62837 1377647 |
|
27-Aug-2012 |
humbedooh |
Fix some style issues, use a more persistent bucket for passing along data (and clean it up the right places), and remove in/out-put filters from the chain if need be. |
36f358b96aca0b6d15b7890dc39ec04933e5132c 1377601 |
|
27-Aug-2012 |
humbedooh |
Removing a misleading comment. |
78f94f1d06c4e6828ce04d618221e0fcecb57849 1377475 |
|
26-Aug-2012 |
humbedooh |
Add new directives, LuaInputFilter/LuaOutputFilter for creating content filters using Lua. |
73a89e86f4cb786cef460edb879dc8bce502383f 1377457 |
|
26-Aug-2012 |
humbedooh |
Add 'server' to scope_to_string's list of possible suspects, as to avoid an error when LogLevel is trace |
14904c1dd6eabedc1a7dae17e16f78834dff1da4 1374310 |
|
17-Aug-2012 |
humbedooh |
Add the missing state release to the LuaMapHandler handler as well, so we won't end in a potential deadlock when acquiring states for in the server scope. |
040959d22b59bbc88edc7dbe963170df8c3f103a 1374295 |
|
17-Aug-2012 |
humbedooh |
Add a missing release of a Lua state (when server scope is used) when a hook returns DECLINED. |
109e2a09790de3fb315d36d6232a14ab66c8eb0a 1374185 |
|
17-Aug-2012 |
humbedooh |
mod_lua: Allow scripts handled by the lua-script handler to set a return
code that will be sent to the client, such as 302, 500 etc. This will
allow scripts to be able to f.x. redirect a user to another page by
returning 302. |
9b39ba70b691a3f82c419ca2ed3a16838d793c16 1370466 |
|
07-Aug-2012 |
sf |
There is only one global provider name space, therefore allow
LuaAuthzProvider only in global scope.
Remove unnecessary server config field. |
74e7a30182af5e68f14ccb8d57918b22b982db8b 1370377 |
|
07-Aug-2012 |
humbedooh |
mod_lua: Decline to serve a request if the script doesn't exist, instead of throwing an internal server error. |
ba7fdc26d604339f841adf2a389fa37e7bb15313 1369800 |
|
06-Aug-2012 |
trawick |
fix "lua_vmprep.c:29:6: warning: no previous prototype for ‘ap_lua_init_mutex’ [-Wmissing-prototypes]" |
4363f87bbb41935718999670e15208a1375e41b3 1369763 |
|
06-Aug-2012 |
humbedooh |
Reverting r1369758 |
679c5329c641e9de6ae65ad1e5b6cb4c9d0ed4b6 1369758 |
|
06-Aug-2012 |
humbedooh |
use the ap_mutex functions to create the mutex instead of the apr_mutex ones. |
295c2dff5970a27964598238325d26340ab8d1a0 1369656 |
|
05-Aug-2012 |
humbedooh |
Add a server scope for Lua states (in LuaScope), which creates a pool of states with manageable minimum and maximum size. |
4dbf457bcfc400bde68b7dae9666859209c66098 1369617 |
|
05-Aug-2012 |
sf |
Revert r1367504:
mod_lua: The current way of getting the authz provider name doesn't
seem to work. This approach should fix that.
This is not necessary and breaks with "Require not ..." |
dd5f4d0bb925b4455d05c3d566e694bbded46ca4 1368109 |
|
01-Aug-2012 |
trawick |
mod_lua.c:189:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] |
fb57141433a12af705da56421319212ea6cbdab3 1367875 |
|
01-Aug-2012 |
humbedooh |
mod_lua:
Clean up style
use apr_pstrcat instead of apr_psprintf
fix a bug that was causing bad string interpolations. |
db38a4275fe8e2e76b0de82b52019f2ec5fda32c 1367725 |
|
31-Jul-2012 |
humbedooh |
mod_lua: Add the (missing) LuaMapHandler directive to the fold.
This should work as the existing documentation describes. |
4b6783e47ad1c5346329e903ce1d24f5a0c6ca6b 1367504 |
|
31-Jul-2012 |
humbedooh |
mod_lua: The current way of getting the authz provider name doesn't seem to work. This approach should fix that. |
5db8f0f2fa88e9b5a2eb368491577bb57773f31a 1367048 |
|
30-Jul-2012 |
humbedooh |
mod_lua: Remember to set cfg->codecache to AP_LUA_CACHE_UNSET when creating a config |
1c090d5036aa34c2031c37e828021cc68ac7ddf8 1367040 |
|
30-Jul-2012 |
humbedooh |
mod_lua: Pass on the request_rec to ap_lua_get_lua_state, so we can use it for allocating memory for the cache info lookup. |
6733711aacc2369da3bf21ccc9a36e32db703139 1366890 |
|
29-Jul-2012 |
humbedooh |
Add LuaCodeCache directive for controlling in-memory caching.
This might need some tweaking on the hash key generation for the mtime lookups, ideas are welcome. |
fc251eb7714d158c2952bc2ddbbcfb9169098212 1361801 |
|
15-Jul-2012 |
sf |
Various code clean up
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 52893 |
e20c6ecbd465cd7dabb44acea6afafc7925f3a03 1351020 |
|
17-Jun-2012 |
sf |
Add new directive LuaAuthzProvider to allow implementing an
authorization provider in lua |
b7776cc084e1b5630ab1be6dc70272fa195e6678 1351018 |
|
17-Jun-2012 |
sf |
factor common code into utility function
also improve logging a bit and adjust some log levels |
c9eab9a9b4ea4554715c34447161853be16f1c7d 1351017 |
|
17-Jun-2012 |
sf |
change various strings from char * to const char * |
723f28377d133603c20f4986d98992a9c43366ab 1220493 |
|
18-Dec-2011 |
sf |
Various code cleanup to avoid compiler, cppcheck, or clang warnings:
modules/debugging/mod_firehose.c: Make some internal functions static
(to do: logs_cleanup() is unused)
modules/filters/mod_charset_lite.c: Remove dead assignments
modules/filters/mod_include.c: likewise
modules/metadata/mod_usertrack.c: likewise
modules/proxy/mod_proxy_ftp.c: likewise
modules/ssl/ssl_engine_pphrase.c: likewise
modules/proxy/mod_proxy_balancer.c: likewise;
Remove NULL check that can never happen
modules/proxy/proxy_util.c: Axe NULL-check that can never happen and if it
would, it would just mask another bug
os/unix/unixd.c: likewise
modules/http/http_filters.c: Remove sub-condition that is always true
modules/lua/mod_lua.c: Add default cases to switch statements
modules/generators/mod_autoindex.c: Unsigned value can never be < 0
server/util_expr_eval.c: Fix compiler warnings with VC and on OS2 |
02a6015458e494c10556f4bfeb3695c4ecd27df1 1220462 |
|
18-Dec-2011 |
sf |
remove some dead code
found by clang statical analyzer |
185aa71728867671e105178b4c66fbc22b65ae26 1209766 |
|
03-Dec-2011 |
sf |
Add lots of unique tags to error log messages |
ae600ca541efc686b34f8b1f21bd3d0741d37674 1201443 |
|
13-Nov-2011 |
covener |
add per-dir config merging to mod_lua so LuaHook* in multiple per-dir sections
behaves as expected instead of discarding previous sections. |
89202f356a706ba1e4edf8b409696e98da92e91c 1201042 |
|
11-Nov-2011 |
rjung |
Use the right lua scope when used as a hook. |
bf677f4e259146f1470736fe6102949bafd6e238 1200977 |
|
11-Nov-2011 |
covener |
don't let thread-scope be selected in a server w/o threads |
9a88da10323d5a485fcb480ee5f1c71a645f2700 1200975 |
|
11-Nov-2011 |
covener |
C99 and unused variable warnings |
d663c24538278742c906369512be715e22c8288a 1200667 |
|
11-Nov-2011 |
brianm |
use a sub-pool for scope_once |
4d586c4e672ded3276d72f95f4a99a47265b8122 1200656 |
|
11-Nov-2011 |
brianm |
replace server scope with thread scope |
b830f030981974ed6224a02cf1ccfa36c516bd67 1200646 |
|
11-Nov-2011 |
brianm |
remove lingering reslist references before killing server scope |
ded506c7887b4175dfacfee306480e352a8eff02 1200639 |
|
11-Nov-2011 |
brianm |
remove ability to set min and max pool sizes for server scope in prep for removing server scope |
2e82e0b7f60901d68ad80292a12dd983895c0355 1200614 |
|
11-Nov-2011 |
brianm |
remove some debug logging which snuck in |
253724bc048368db7a7620b292ee90aee3b79878 1200580 |
|
10-Nov-2011 |
jorton |
* modules/lua/mod_lua.c (ap_lua_ssl_is_https): New function.
(lua_post_config): Pick up ssl_is_https optional function.
* modules/lua/lua_request.c (req_ssl_is_https_field): New function.
(ap_lua_load_request): Map is_https field to above. |
7bf1401ef4bee095f2f6ce59519e0a6c1018324f 1200513 |
|
10-Nov-2011 |
brianm |
remove last traces of the code cache |
2e81af32604c9525701ce1ed2bdeee63447831d0 1200475 |
|
10-Nov-2011 |
brianm |
fix issue with incorrect munging of the lua package path -- LuaPackagePath directives were not working |
54737641e134b529fbfc7db64f9ec6a4ac5362cd 1200204 |
|
10-Nov-2011 |
covener |
ap_check_cmd_context checks don't work on the block forms
of the lua directives. |
4872f2c13be21115687dedcdf2515980fde93b70 1199056 |
|
08-Nov-2011 |
covener |
mod_lua: Expose SSL variables via r:ssl_var_lookup() |
be918ac21416c363014aca09383937579ca01db5 1199031 |
|
08-Nov-2011 |
covener |
allow some lua hooks to be run in "early" or "late" mode |
789f46cb4d4c3e32f6550f17f74ea4a054095901 1197853 |
|
05-Nov-2011 |
covener |
quick handlers and translate_name in lua can't be keyed off
Directory/Filename/htaccess |
539c658848512631bb4db3529e84b6d45401b925 1197782 |
|
04-Nov-2011 |
covener |
get the hello world of Handlers working again |
279f3d19eeb9a89e5c619dfe818df5d10b72be71 1187748 |
|
22-Oct-2011 |
covener |
quick handler in an external file is already enabled, quick handler in block
form seems to work just as well. |
9704354e1cdddd5d367daef753ab621926095480 1174937 |
|
23-Sep-2011 |
sf |
More style fixes, no func changes |
11e076839c8d5a82d55e710194d0daac51390dbd 1174929 |
|
23-Sep-2011 |
sf |
More cleanup: Expand tabs and some more indentation fixes
No functional change |
5bfaaf573bacb45c1cf290ce85ecc676587e8a64 1174751 |
|
23-Sep-2011 |
jim |
Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change |
8bd599bd5e87f9fbbbc1f7240e7b813fb6d286e5 1086756 |
|
29-Mar-2011 |
sf |
Change the ap_cfg_getline() and ap_cfg_getc() to return an error code.
Also:
- Make ap_cfg_getline() return APR_ENOSPC if a config line is too long.
- Add ap_pcfg_strerror() function to convert ap_cfg_getline's return value
into a nice message.
- Adjust definition of ap_configfile_t accordingly.
Not bumping MMN because it has already been bumped today. |
5f3b00aed8bb38b16e6ff5590c97166eae862c12 1081611 |
|
15-Mar-2011 |
brianm |
apply patch from zhiguo zhao <zhaozg@gmail.com> to significantly improve server scope handling |
4e0565f42481dff87062cbfc55a2ecaa36b92e83 1002156 |
|
28-Sep-2010 |
sf |
save some memory by using cmd->temp_pool instead of cmd->pool in some places |
1634af6871d0518c6d3fe3919158dd3401e00add 953203 |
|
10-Jun-2010 |
wrowe |
Drop ap_body_to_table due to missing constraints; a DoS waiting
for an exploit.
Some mod_lua fan aught to revisit this and provide a sensible
implementation. |
36ef8f77bffe75d1aa327882be1b5bdbe2ff567a 951895 |
|
06-Jun-2010 |
sf |
Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels |
7c54f983cc810efb2b960cb2ad19731f566f6fa7 939987 |
|
01-May-2010 |
poirier |
Add info to debug logging.
Avoid null pointer dereference by returning if we can't get
a lua VM.
Move "we got a VM" message to after we know we have one.
Check that we found the lua handler function before trying to
call it. |
c6afffe96adf806113561e604e9f8481eab49300 832910 |
|
05-Nov-2009 |
jorton |
* modules/lua/: s/apr_strnatcmp/strcmp/ - strnat*cmp functions are
for natural order string sorting. |
b4a69660c802909ef489e1b605beb2dcc9837909 758428 |
|
25-Mar-2009 |
wrowe |
fix symbol space and exports |
b9773baad96c7a544f35beb5214bf51fc3f13cd6 728621 |
|
22-Dec-2008 |
rpluem |
* Remove unused variable |
033b4efe6d287d98b8b8568f668948542e78c940 728568 |
|
22-Dec-2008 |
pquerna |
Use the HTTP_INTERNAL_SERVER_ERROR define instead of 500 directly. |
22368ac3329d698360f22bf1adb05825cc5d5773 728544 |
|
21-Dec-2008 |
pquerna |
Fix more ISO C90 forbids mixed declarations and code... |
21776881c58b65ff1c0a787f8412dbc83d0c5100 728539 |
|
21-Dec-2008 |
pquerna |
Attempt to make mod_lua compile under a strict c89 compiler by moving all variable declarations to be before code. |
39bfc06718264cb819a2646ec4cd1e9c421549b9 728531 |
|
21-Dec-2008 |
pquerna |
Change apl_get_lua_state to take a apl_vm_spec instead of a filename, and to
load the bytecode if it is present, rather than the file, as this gets the
inline config file blocks hooks working again. |
2d8099733b19806900cb95470c5715df2e5a1f3d 728516 |
|
21-Dec-2008 |
pquerna |
Reformat mod_lua according to the HTTP Server Project C Style Guide:
<http://httpd.apache.org/dev/styleguide.html>
No functional changes. |
a3d882402e007971c0bff50c252ce922d9925a85 728511 |
|
21-Dec-2008 |
pquerna |
Make all of the hook callbacks static functions. |
5e8c459cb9c7c6c9bc647ae856f4eb613f7224c1 728509 |
|
21-Dec-2008 |
pquerna |
Fixup lua_config.c with prefix rename, and make mod_lua.c so it compiles again. |
e0e7a4768845d518c21ce98d359d2ba8314832ba 728508 |
|
21-Dec-2008 |
pquerna |
Rename all files in mod_lua to have a lua_ prefix, as things like 'config.h' are way to generic and will often conflict with other include files. |
fa21815c2fce84c8a6f56bccd3ad4c0537c6f1fd 728506 |
|
21-Dec-2008 |
pquerna |
Rename most of the module formally known as mod_wombat to mod_lua conventions, switching apw prefixes for apl. |
c381599e85eb318a270f3e3b07851bff77e5c151 728494 |
|
21-Dec-2008 |
pquerna |
Rename mod_wombat -> mod_lua.
Note that this isn't a complete transformation yet, but it should basically compile and load as mod_lua. |