1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Commit Graph

8767 Commits

Author SHA1 Message Date
Jeff Trawick
e19c8aabd4 don't log bogus rv
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1583007 13f79535-47bb-0310-9956-ffa450edef68
2014-03-29 14:57:37 +00:00
Daniel Gruno
b6899453ab Add a note on t->r checking, as per Rüdiger's email.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582881 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 20:43:15 +00:00
Daniel Gruno
29e243b1fb mod_lua: Since c->notes is the only place where r will be NULL, we don't need to check a second time, since we'll never meddle with tables named 'notes'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582877 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 20:33:08 +00:00
Daniel Gruno
d38e1b6e83 mod_lua: Redesign the table construction/access mechanism, so we pass on a struct with the request_rec, the table pointer and the table name instead of just the table pointer. This allows us to use the request_rec for logging/editing purposes, as well as inform the user which exact table in the request_rec was modified.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582858 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 18:38:41 +00:00
Daniel Gruno
8ae663bc78 mod_lua: Prevent HTTP Response Splitting by not allowing tables in the request_rec to be set with values containing newlines. This is a semi-ugly hack, but it will have to do until we find another way of setting these values.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582262 13f79535-47bb-0310-9956-ffa450edef68
2014-03-27 11:20:03 +00:00
Daniel Gruno
2514105ae4 mod_lua: escape key/value pairs when setting cookies to prevent header splitting with tainted cookies.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582253 13f79535-47bb-0310-9956-ffa450edef68
2014-03-27 10:58:35 +00:00
Daniel Gruno
8ad00113ae mod_lua: Reformat and escape script error output.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1582247 13f79535-47bb-0310-9956-ffa450edef68
2014-03-27 10:44:43 +00:00
Eric Covener
575f6bef60 mod_reqtimeout: Resolve unexpected timeouts on keepalive requests
under the Event MPM. PR56216.  

Submitted By: Frank Meier <frank meier ergon ch>
Committed By: covener




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1580568 13f79535-47bb-0310-9956-ffa450edef68
2014-03-23 18:59:37 +00:00
Daniel Gruno
266b5a6438 fix message number
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578882 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 13:40:03 +00:00
Daniel Gruno
8ae204c9b0 mod_lua: Actually check whether interpreting the base structure of a file works or not, don't just assume it works.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578870 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 13:32:36 +00:00
Daniel Gruno
31ad0e2d6b mod_lua: be a bit more verbose in error logging.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578825 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 11:26:04 +00:00
Christophe Jaillet
6e69b3ceb0 Use 'apr_table_setn' instead of 'apr_table_set' when possible in order to save memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578762 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 06:54:03 +00:00
Christophe Jaillet
e2643b38f9 Use 'apr_table_setn' instead of 'apr_table_set' when possible in order to save memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578760 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 06:52:08 +00:00
Christophe Jaillet
845a77beca Use 'apr_table_setn' instead of 'apr_table_set' when possible in order to save memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1578759 13f79535-47bb-0310-9956-ffa450edef68
2014-03-18 06:51:49 +00:00
Daniel Gruno
82e4ee75b0 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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1576981 13f79535-47bb-0310-9956-ffa450edef68
2014-03-12 22:56:44 +00:00
Stephen Henson
72889d15f8 A bug in some older versions of OpenSSL will cause a crash
in SSL_get_certificate for servers where the certificate hasn't
been sent.

Workaround by setting the ssl structure to client mode which
bypasses the faulty code in OpenSSL. Normally setting a server
ssl structure to client mode would cause problems later on:
but we are freeing the structure immediately without attempting
to use it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1576741 13f79535-47bb-0310-9956-ffa450edef68
2014-03-12 13:52:26 +00:00
Jan Kaluža
7c077f5aff mod_authn_socache.c: fix creation of default socache_instance.
In pre_config, default socache_provider is created, but socache_instance
initialization is missing. This leads to crash on startup if default
socache_provider is used (AuthnCacheSOCache is not called) and
AuthnCacheEnable or AuthnCacheProvideFor is used.

This problem has been introduced in r1531961.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1576233 13f79535-47bb-0310-9956-ffa450edef68
2014-03-11 08:52:54 +00:00
Jeff Trawick
d50ebf12a6 fix spelling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1575958 13f79535-47bb-0310-9956-ffa450edef68
2014-03-10 14:57:14 +00:00
William A. Rowe Jr
0559370e7e CVE-2014-0098 (reported by Rainer Canavan <rainer-apache 7val com>)
Segfaults w/ truncated cookie logging.

Clean up the cookie logging parser to recognize only the cookie=value pairs,
not valueless cookies.  This refactors multiple passes over the same string
buffer into a single pass parser.

Submitted by: wrowe
Reviewed by: rpluem, jim 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1575400 13f79535-47bb-0310-9956-ffa450edef68
2014-03-07 20:56:24 +00:00
William A. Rowe Jr
577eaf25cd Revert r1574518 to get 2.2/2.4/2.x all back in sync for a single fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1575394 13f79535-47bb-0310-9956-ffa450edef68
2014-03-07 20:45:33 +00:00
Jim Jagielski
82756fe342 ensure cookies have name/value
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1574518 13f79535-47bb-0310-9956-ffa450edef68
2014-03-05 15:00:56 +00:00
Jeff Trawick
1598eac14e follow-up to r1562472, 1561262, and 1561923:
Improve messaging...

* easier to tell what went wrong in some cases
* reduce number of debug messages without losing information in some cases


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1574151 13f79535-47bb-0310-9956-ffa450edef68
2014-03-04 17:45:36 +00:00
Jim Jagielski
cd304f4964 Allow reverse-proxy to be set via explicit handler
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1573626 13f79535-47bb-0310-9956-ffa450edef68
2014-03-03 17:28:17 +00:00
Yann Ylavic
1e9f5c99cf mod_proxy: Add comment and avoid ternary operator as condition (no functional change).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1573229 13f79535-47bb-0310-9956-ffa450edef68
2014-03-01 21:36:27 +00:00
Yann Ylavic
146a8d0064 mod_deflate: when consuming zlibs flags, APR_INCOMPLETE implies no more bytes available.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1573224 13f79535-47bb-0310-9956-ffa450edef68
2014-03-01 20:34:55 +00:00
Yann Ylavic
d29ce4b047 mod_proxy: follows up r1572630.
Don't reuse a SSL backend connection with no SNI for a request requiring SNI.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572967 13f79535-47bb-0310-9956-ffa450edef68
2014-02-28 14:46:50 +00:00
Yann Ylavic
bd82e79001 mod_deflate: follows up r1572896.
Be safe from successive or post end-of-stream flush buckets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572911 13f79535-47bb-0310-9956-ffa450edef68
2014-02-28 10:42:47 +00:00
Yann Ylavic
6175046246 mod_deflate:
Don't fail when asked to flush inflated data to the user-agent and that
coincides with the end of stream ("Zlib error flushing inflate buffer").
PR 56196.

Submitted By: [Christoph Fausak <christoph.fausak glueckkanja com>]
Committed By: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572896 13f79535-47bb-0310-9956-ffa450edef68
2014-02-28 09:42:41 +00:00
Daniel Gruno
9dcfbbf7d4 this wasn't supposed to be a pointer, thanks Yann!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572748 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 21:56:59 +00:00
Daniel Gruno
78f93a7569 Remove bad line that snuck into the commit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572704 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 19:11:54 +00:00
Daniel Gruno
760d584e2b mod_lua: Only read up to whatever the user defines as max size when using r:parsebody() - if content length is greater, return an error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572703 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 19:10:55 +00:00
Yann Ylavic
a65687806d Commit 6 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Ignore empty buckets and split buckets longer than INT_MAX (since zlib uses 32-bit ints only) in all filters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572671 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 18:15:03 +00:00
Yann Ylavic
a915ff1f64 Commit 5 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Handle Zlib flags in the inflate input filter as in the output filter, using consume_zlib_flags().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572670 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 18:08:34 +00:00
Yann Ylavic
e3171b7fa6 Commit 4 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Handle non blocking reads which would block in the inflate input filter (not an error).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572669 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 18:01:38 +00:00
Yann Ylavic
50c0de8c98 Commit 3 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Handle Zlib validation bytes buffering (CRC + length) in the inflate input filter :
- use validation_buffer and validation_length as state,
- loop until all the bytes are received.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572668 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 17:57:13 +00:00
Yann Ylavic
c273acce07 Commit 2 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Handle Zlib header buffering in the inflate input filter :
- loop until all the header is received,
- handle non blocking reads returning empty brigade,
- fix a double ap_get_brigade() when an EOS brigade is encountered while reading the header,
- in that case and no data was received so far, don't return an error but SUCCESS with the EOS, otherwise fail,
- don't remove the Content-Length and Content-MD5 headers until some data is read.

Still does not handle Zlib flags for now, next commits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572663 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 17:35:58 +00:00
Yann Ylavic
3f8a64e490 Commit 1 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
PR 46146 (patches from duplicated PR 55666)

Handle Zlib header buffering in the inflate output filter :
- add the new deflate_ctx_t fields needed to re-enter the Zlib header parsing,
- introduce the new consume_zlib_flags() function to parse/consume the ZLib flags (will be used by the other filters too),
- use it to handle incomplete header in the output filter (deflate).

This alone fixes PR 55666, but the issue remains for PR 46146 (inflate/deflate input filters), hence the following patches.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572655 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 16:56:07 +00:00
Yann Ylavic
fb3ff3e754 Redo what was reverted in r1572627.
Don't reuse a SSL backend connection whose SNI differs. PR 55782.
This may happen when ProxyPreserveHost is on and the proxy-worker
handles connections to different Hosts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572630 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 15:40:01 +00:00
Yann Ylavic
0ab0ee5043 Move newly added proxy_conn_rec's uds_path field to the end of the struct like in 2.4.x.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572628 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 15:33:58 +00:00
Yann Ylavic
dc560db2e9 Revert r1572606 for the time being since backport would conflict with 2.4.x's proxy_conn_rec.
The uds_path field is at the end of the struct in 2.4.x but not in trunk.
Fix that first, then recommit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572627 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 15:31:58 +00:00
Yann Ylavic
93a607e6f2 Don't reuse a SSL backend connection whose SNI differs. PR 55782.
This may happen when ProxyPreserveHost is on and the proxy-worker
handles connections to different Hosts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572606 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 14:52:12 +00:00
Yann Ylavic
739dc00ca9 Avoid useless functions calls.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572561 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 13:39:25 +00:00
Yann Ylavic
42b77650ae Cleanup the client to backend brigade before returning an error (if any) to avoid buckets lifetime issues (backend connection's pool destroyed before request's one). PR 50335.
Suggested by rpluem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572543 13f79535-47bb-0310-9956-ffa450edef68
2014-02-27 13:05:24 +00:00
Jan Kaluža
82f90723be mod_deflate: fix decompression of files larger than 4GB. According to RFC1952,
Input SIZE (compLen) contains the size of the original input data modulo 2^32.

PR: 56062
Submitted by: Lukas Bezdicka


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1572092 13f79535-47bb-0310-9956-ffa450edef68
2014-02-26 15:30:25 +00:00
Jeff Trawick
e280cf4ff7 normalize an ugly construct which somehow manages to return the correct value
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1571369 13f79535-47bb-0310-9956-ffa450edef68
2014-02-24 17:52:08 +00:00
Jeff Trawick
f63c145039 fix spelling error in comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1571368 13f79535-47bb-0310-9956-ffa450edef68
2014-02-24 17:50:16 +00:00
Yann Ylavic
accfcf7471 Log an error in mod_proxy_http when reading the request body fails.
Follow-up to r1538776 where incomplete bodies are detected and an error returned through the input filters.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570598 13f79535-47bb-0310-9956-ffa450edef68
2014-02-21 15:08:32 +00:00
Daniel Gruno
dde9e0effa Allow mod_lua to supply a database result with named rows instead of only numeric indexes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570528 13f79535-47bb-0310-9956-ffa450edef68
2014-02-21 11:10:10 +00:00
Eric Covener
4ef49e127a *) mod_rewrite: Add RewriteOptions InheritDown, InheritDownBefore,
and IgnoreInherit to allow RewriteRules to be pushed from parent scopes
     to child scopes without explicitly configuring each child scope.
     PR56153. 

Submitted By: Edward Lu
Committed By: covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570288 13f79535-47bb-0310-9956-ffa450edef68
2014-02-20 18:08:31 +00:00
Daniel Gruno
c92f2cf0ad mod_lua: Add r:wspeek for checking if data is available to be read.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570208 13f79535-47bb-0310-9956-ffa450edef68
2014-02-20 14:46:38 +00:00