1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

211 Commits

Author SHA1 Message Date
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
fd962221ea Fix integer overflow in ap_pregsub. This can be triggered e.g.
with mod_setenvif via a malicious .htaccess

CVE-2011-3607
http://www.halfdog.net/Security/2011/ApacheModSetEnvIfIntegerOverflow/


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198940 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:13:40 +00:00
Stefan Fritsch
05eb254d1b No need to zero memory that we will overwrite anyway
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198934 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:04:40 +00:00
Jim Jagielski
95ced96d65 Remove magic numbers; ensure that an invalid nmatch is corrected
tagged

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1194912 13f79535-47bb-0310-9956-ffa450edef68
2011-10-29 16:07:16 +00:00
Graham Leggett
b84938b043 mod_include: Add support for application/x-www-form-urlencoded encoding
and decoding.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1194870 13f79535-47bb-0310-9956-ffa450edef68
2011-10-29 11:13:37 +00:00
Stefan Fritsch
308d06fd8d Improve handling of maxlen = APR_SIZE_MAX, noticed by Jim.
Use apr_pregsub_ex() and maxlen = 0 for unlimited in mod_substitute.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1189985 13f79535-47bb-0310-9956-ffa450edef68
2011-10-27 20:15:36 +00:00
Stefan Fritsch
04ca93ecff Limit ap_pregsub() to 64K, add ap_pregsub_ex() for longer strings and with
better error reporting. Modify ap_varbuf_regsub() to be similar to
ap_pregsub_ex().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1188950 13f79535-47bb-0310-9956-ffa450edef68
2011-10-25 22:29:13 +00:00
Eric Covener
95457d4698 flip operator in comment for r1182887 and add some whitespace
to highlight the restriction on nmatch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1183007 13f79535-47bb-0310-9956-ffa450edef68
2011-10-13 17:41:41 +00:00
Jim Jagielski
2632a97856 Force the honoring of AP_MAX_REG_MATCH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1182887 13f79535-47bb-0310-9956-ffa450edef68
2011-10-13 14:49:39 +00:00
Stefan Fritsch
caf0908cf5 Shut up gcc/glibc warning about ignoring write()'s return value.
This may actually fix a real bug in case the error log is directed to a FIFO.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180334 13f79535-47bb-0310-9956-ffa450edef68
2011-10-08 07:54:31 +00:00
Stefan Fritsch
e1fc6f9d0c Some varbuf enhancements:
- Introduce new ap_varbuf_pdup() and ap_varbuf_regsub() functions.
- Fix some bugs in ap_varbuf_strmemcat().
- Make ap_varbuf.buf point to an empty string if no buffer has been allocated,
  yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1176018 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 20:05:09 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
01ed21af9d Add wrappers for malloc, calloc, realloc that check for out of memory
situations.  Use them in most places where malloc, and friends are used.
This results in clean error messages in an out of memory situation instead of
segfaulting or silently malfunctioning. In some places, it just allows to
remove some logging code.

PR 51568, PR 51569, PR 51571.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172686 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 16:25:42 +00:00
Eric Covener
f868cec39b Give a slightly more direct hint when no global ServerName is set. I still
think this buries the lead, but it's hard to rewrite to change the emphasis
yet maintain googleability.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172410 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 01:36:39 +00:00
Stefan Fritsch
84a104bb22 Add ap_varbuf API for resizable buffers.
Increase length limit of lines in the configuration file to 16MB.
Increase length limit of lines in the group file to 16MB.

PR: 45888, 50824, 43084

Windows and Netware build changes are untested.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157354 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 09:06:35 +00:00
Stefan Fritsch
51692222f6 Various code cleanup
PR: 51398
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138627 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:45:34 +00:00
Stefan Fritsch
255f723fef We already have ap_str_tolower(), so also add ap_str_toupper() function and use
it where possible.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138617 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:24:27 +00:00
Stefan Fritsch
c9fd2623da Introduce ap_(get|set)_core_module_config() functions/macros and use them
everywhere.

We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
2011-06-06 21:26:56 +00:00
Stefan Fritsch
7b61bedb2f 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086756 13f79535-47bb-0310-9956-ffa450edef68
2011-03-29 21:29:34 +00:00
Daniel Earl Poirier
fdaaf209c5 core: AllowEncodedSlashes new option NoDecode to allow encoded slashes
in request URL path info but not decode them. Change behavior of option
"On" to decode the encoded slashes as 2.0 and 2.2 do.  PR 35256,
PR 46830.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082196 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 16:45:25 +00:00
Jim Jagielski
ec88a92d83 Expose "new" ap_parse_form_data() function instead of requiring
mod_request for any module that may want to parse form data...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1072099 13f79535-47bb-0310-9956-ffa450edef68
2011-02-18 18:40:31 +00:00
Stefan Fritsch
6e108fd44f Make ap_pstr2_alnum accept const char dest
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1061695 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 09:03:52 +00:00
Stefan Fritsch
58f17628ac Move ap_resolve_env to core.c, in preparation for adding mod_define-like
variable support.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1061444 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 18:37:47 +00:00
Stefan Fritsch
4092815c5c Fix compile error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060996 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 21:23:34 +00:00
Jim Jagielski
334ae2f5a2 Make it clear that '_' is a possible char and accepted
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060802 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 13:08:08 +00:00
Jim Jagielski
a713db09d4 Make the balancer shared memory slot more human readable. But we need
to make it a "safe" filename, so create 2 funcs which do that.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060657 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 02:41:49 +00:00
Stefan Fritsch
cf0e2c3a46 Fix some Windows build issues
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039204 13f79535-47bb-0310-9956-ffa450edef68
2010-11-25 22:27:17 +00:00
Stefan Fritsch
e32977e84f Another ooops: properly return APR_SUCCESS
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032169 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 22:16:25 +00:00
Stefan Fritsch
286c8622b6 Add a generic pool cleanup function that sets a pointer to NULL and use
it to replace various pool cleanup functions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032167 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 22:12:41 +00:00
Guenter Knauf
2768a20d29 Added header include for getpid() prototype on Win32.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025496 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20 11:03:01 +00:00
Jeff Trawick
97a59dd6c4 c isn't used after being set (Fortify)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@991515 13f79535-47bb-0310-9956-ffa450edef68
2010-09-01 12:41:19 +00:00
Jim Jagielski
b6c87a8750 Pull out "does request have a body" logic to a central
canon function and use that for the 100-Continue OK
check.

Should likely also start using this in the various
other places we do this "have body" check thruout
the codebase...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986699 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 14:30:50 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Stefan Fritsch
7b74009049 Make ap_pregsub(), used by AliasMatch and friends, use the same syntax
for regex backreferences as mod_rewrite and mod_include: Remove the use
of '&' as an alias for '$0' and allow to escape any character with a
backslash.

Document the use of $0.

PR: 48351


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@904765 13f79535-47bb-0310-9956-ffa450edef68
2010-01-30 11:20:53 +00:00
Daniel Earl Poirier
ea1cc8ece9 Spelling fix in comment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@820038 13f79535-47bb-0310-9956-ffa450edef68
2009-09-29 17:32:17 +00:00
Brian Havard
60fbe11de1 Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
2009-08-26 08:56:13 +00:00
Jeff Trawick
ee32468a33 remove OS/2 platform support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
Nick Kew
15ad1d5eb2 Add support for escaping all non-ascii chars to ap_escape_html, and use
it to fix PR#25202: encoding="entity" doesn't work as advertised in
mod_include.
For backport, this'll need an ABI-preserving version that'll be
a minor MMN bump.  But if we do that in /trunk/, it'll never change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730296 13f79535-47bb-0310-9956-ffa450edef68
2008-12-31 02:27:24 +00:00
Takashi Sato
4975fd3583 * Change some "apr_palloc / memcpy" to apr_pstrmemdup
PR: 39519
Submitted by: Christophe JAILLET <christophe.jaillet wanadoo.fr>

* Remove unnecessary casts

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726884 13f79535-47bb-0310-9956-ffa450edef68
2008-12-16 00:08:01 +00:00
Ruediger Pluem
81c73ca116 * Move ap_timeout_parameter_parse from mod_proxy.c to server/util.c and thus
make it part of the public API.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@707022 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 10:23:52 +00:00
Paul Querna
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
Graham Leggett
f05f1f9bbc Rename the ap_escape_path_segment_b function as suggested by
Ruediger Pluem, and make a corresponding minor bump.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645120 13f79535-47bb-0310-9956-ffa450edef68
2008-04-05 15:26:03 +00:00
Graham Leggett
2b7c89aab4 mod_session: Add a generic session interface to unify the different
attempts at saving persistent sessions across requests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@644746 13f79535-47bb-0310-9956-ffa450edef68
2008-04-04 15:58:15 +00:00
Ruediger Pluem
6654f2f657 * Revert to old behaviour: Even if we detect a bad character: Formally decode
string correctly and do not mess up the string. Let the caller decide what
  it wants to do with the result according to our return code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@606776 13f79535-47bb-0310-9956-ffa450edef68
2007-12-25 09:35:05 +00:00
Nick Kew
21f637bb25 Fix r578332 for backslashing filesystems, as noted by rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@578479 13f79535-47bb-0310-9956-ffa450edef68
2007-09-22 19:30:20 +00:00
Nick Kew
4c672a8d72 * Rationalise the two ap_unescape_url versions
* Fix ap_unescape_url_keep2f to work as documented (keep %2F encoded,
  bringing it into line with the documentation as well as common sense).
* Introduce suggestion of an extension to the API
The most relevant open PR is 41798


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@578332 13f79535-47bb-0310-9956-ffa450edef68
2007-09-22 00:10:10 +00:00
Ruediger Pluem
19515421df * We need to supply a (char *) to ap_str_tolower not a char.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@558133 13f79535-47bb-0310-9956-ffa450edef68
2007-07-20 20:54:29 +00:00
Nick Kew
e5061abc93 Multiple trivial fixes from Christophe JAILLET
PR 38699, 39518, 42005, 42006, 42007, 42008, 42009
The patches are all his, and are sufficiently trivial to review
at a glance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@557837 13f79535-47bb-0310-9956-ffa450edef68
2007-07-20 01:26:55 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00