Commit Graph

181 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
90521799bd Bring forward the fix for CVE-2005-3352 already on the branches:
* modules/mappers/mod_imagemap.c (imap_url): Escape the referer.

* server/util.c (ap_escape_html): Escape the " character.

Submitted by: mjc
Reviewed by: fielding, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357161 13f79535-47bb-0310-9956-ffa450edef68
2005-12-16 14:27:47 +00:00
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
f5c5c2cce8 Clean up c2x code-path by not double-setting the prefix variable.
* server/util.c
  (c2x): Take a new prefix parameter instead of hard-coding '%' and then
  conditionally setting 'x' for half of the cases.

Reviewed by: nd


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@292111 13f79535-47bb-0310-9956-ffa450edef68
2005-09-28 03:45:01 +00:00
d81de0d9b3 Add ap_append_pid(); This is performed enough to warrant
a function I think, especially with the fact that
the mapping of getpid() to APR_PID_T_FMT isn't
consistant in some areas. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265506 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:22:08 +00:00
897691ca2d Fix trailing backslashes in configuration directives.
PR: 34834
Submitted by: Timo Viipuri <viipuri dlc.fi>
Reviewed by: Paul Querna


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178209 13f79535-47bb-0310-9956-ffa450edef68
2005-05-24 17:25:41 +00:00
9ba8a004c9 Ensure that we always return a FQDN... This is not guaranteed by either
apr_sockaddr_info_get() or apr_getnameinfo(). Also note that under
OS X, apr_getnameinfo() always seems to fail (at least on my
machines) so if we don't specific ServerName at the global setting,
we get a warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@164092 13f79535-47bb-0310-9956-ffa450edef68
2005-04-21 17:30:21 +00:00
038b44739b APRized ap_get_local_host()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@162066 13f79535-47bb-0310-9956-ffa450edef68
2005-04-20 20:40:46 +00:00
a0570c8746 Move the POSIX reg* implementations into the ap_* namespace;
internalise the ap_reg*<->PCRE wrapper:

* configure.in: Add srclib/pcre to the include path.

* include/ap_regex.h: Renamed from include/pcreposix.h.  Prefix all
constants with AP_; prefix all functions and types with ap_.  Define
AP_DECLARE to nothing if necessary.  Remove regcomp error codes.

* include/httpd.h: Include ap_regex.h not pcreposix.h.
(ap_pregcomp, ap_regexec, ap_regfree): s/regex_t/ap_regex_t/.
(ap_regexec, ap_regerror): Prototypes moved to ap_regex.h.

* server/util.c (regex_cleanup, ap_pregcomp, ap_pregsub, ap_pregfree):
Adjust for ap_ prefixed types.  (ap_regexec, ap_regerror): Removed.

* server/Makefile.in: Build util_pcre.c.

* server/util_pcre.c: Copied from srclib/pcre/pcreposix.c; remove use
of PCRE-internals to do error mapping; rename types to add AP_/ap_
prefixes as above.  Use APR includes.  (ap_regerror): Use apr_snprintf.

* srclib/pcre/Makefile.in: Don't build pcreposix.c into libpcre.la.

* modules/*: Update to use new type and constant names.

PR: 27750 (part one)
Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153384 13f79535-47bb-0310-9956-ffa450edef68
2005-02-11 12:00:41 +00:00
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
c76dd4ecef veto and revert win64 patch: 64bit changes must percolate from the
bottom (APR/system) up -- we can't give the client a 64bit API and
then cast it to 32bits internally without introducing security holes
on other platforms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105572 13f79535-47bb-0310-9956-ffa450edef68
2004-10-23 22:39:53 +00:00
6c775f9a3c WIN64: API changes to clean up Windows 64bit compile warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105545 13f79535-47bb-0310-9956-ffa450edef68
2004-10-22 15:22:05 +00:00
f2d3d37f2d * server/util.c (ap_resolve_env): Rewrite to avoid buffer overflows.
Submitted by: Andr�� Malo
Reviewed by: jorton, mjc


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105130 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 11:44:05 +00:00
3df20e742a handling of encoded non-slashes was borked in the
AllowEncodedSlashes path

thanks to FirstBill for pointing that out!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104937 13f79535-47bb-0310-9956-ffa450edef68
2004-09-02 19:49:21 +00:00
a7f3a9b107 Fix the handling of URIs containing %2F when AllowEncodedSlashes
is enabled.  Previously, such urls would still be rejected with
404.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104925 13f79535-47bb-0310-9956-ffa450edef68
2004-09-01 15:14:33 +00:00
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
e88fcf3c64 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102589 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:58:22 +00:00
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
a7db87b9ad SECURITY [CAN-2003-0020]: escape arbitrary data before writing into the
errorlog.

Reviewed by: Mark J Cox


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101873 13f79535-47bb-0310-9956-ffa450edef68
2003-11-24 21:34:38 +00:00
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
cdddc76c84 axe a special check for EOF+data from apr_file_gets()... apr_file_gets()
doesn't return that combination of conditions any more


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100826 13f79535-47bb-0310-9956-ffa450edef68
2003-07-28 20:10:42 +00:00
e8292fc3f3 Following the previous commit, adjust the actual parameters of
ap_strcmp_match() and ap_strcasecmp_match() to use 'expected' rather
than 'exp' to avoid shadowing the global exp() function.

Submitted by: Justin Erenkrantz <justin@erenkrantz.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100286 13f79535-47bb-0310-9956-ffa450edef68
2003-06-17 17:38:16 +00:00
4da6182a9f Don't run regex cleanups before exec
Submitted by:	Jeff Trawick
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99133 13f79535-47bb-0310-9956-ffa450edef68
2003-03-31 04:45:57 +00:00
c8185c253b Minor MMN bump:
Forward port: Escape special characters (especially control
characters) in mod_log_config to make a clear distinction between
client-supplied strings (with special characters) and server-side
strings. This was already introduced in version 1.3.25.

Obtained from: Patch in 1.3.25-dev by Martin


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98912 13f79535-47bb-0310-9956-ffa450edef68
2003-03-06 23:53:52 +00:00
721890ad66 Avoid passing too many characters to getenv. Make sure that only the
environment variable string is passed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98625 13f79535-47bb-0310-9956-ffa450edef68
2003-02-12 17:17:09 +00:00
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
12b11896a7 here we go. add a directive that will keep %2f from being
decoded into '/', allowing the *_walk to do their magic and
	return 404 if it's in the path, and allowing it in the path-info.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98479 13f79535-47bb-0310-9956-ffa450edef68
2003-01-23 21:34:13 +00:00
6c3569b193 2.0 -> 2.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97800 13f79535-47bb-0310-9956-ffa450edef68
2002-12-08 21:05:57 +00:00
bfd10d14bb Use APR_STATUS_IS_EOF rather than a check against APR_EOF
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97378 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 18:01:27 +00:00
7310a8c6b5 Style police were called back from their vacation
*No functional changes*


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97377 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 17:57:47 +00:00