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
30f8aa6460
more apr_file_write_full() simplification (like r1542413)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542416 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 22:03:16 +00:00
Jan Kaluža
452c223fe6
Add parse_errorlog_arg callback to ap_errorlog_provider to allow providers
...
to check the ErrorLog argument. Implement this check in mod_syslog.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1541029 13f79535-47bb-0310-9956-ffa450edef68
2013-11-12 12:14:50 +00:00
Jeff Trawick
528855d544
Error log providers need to be able to trigger a startup error from their
...
init() function. A NULL return code is the trigger.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527003 13f79535-47bb-0310-9956-ffa450edef68
2013-09-27 17:52:13 +00:00
Jan Kaluža
904b3f8d8b
Add AP_ERRORLOG_PROVIDER_ADD_EOL_STR flag for ap_errorlog_provider, bump MMN.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525845 13f79535-47bb-0310-9956-ffa450edef68
2013-09-24 11:03:55 +00:00
Jeff Trawick
84d106dec4
allow the provider to decide whether or not APLOG_NOTICE
...
messages should be logged
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525664 13f79535-47bb-0310-9956-ffa450edef68
2013-09-23 18:15:32 +00:00
Jan Kaluža
a4330cc11c
mod_syslog: New module implementing syslog ap_error_log provider.
...
Previously, this code was part of core, now it's in separate module.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525600 13f79535-47bb-0310-9956-ffa450edef68
2013-09-23 14:16:17 +00:00
Christophe Jaillet
4a9b30db53
Use %S instead of %C which already in use
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1517386 13f79535-47bb-0310-9956-ffa450edef68
2013-08-25 21:43:42 +00:00
Christophe Jaillet
d9e659b18f
mod_logio: new format-specifier %C (combined) which is the sum of received and sent byte counts. PR54015
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1484910 13f79535-47bb-0310-9956-ffa450edef68
2013-05-21 19:26:10 +00:00
Rainer Jung
9d0208a301
Fix crash in mod_log_config when logging
...
request end time for a failed request
(LogFormat contains %{end}t).
The request_config for mod_log_config might
not be initialized.
PR 54828.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1467765 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 11:16:40 +00:00
Christophe Jaillet
b3f29e2bd8
Use ap_bin2hex instead of sprintf(..., "%02x". It gives the same output and is faster.
...
No real speedup should be achieved on production machine, because this is done
only for characters that need to be escaped.
However, this will close PR 50919.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1429564 13f79535-47bb-0310-9956-ffa450edef68
2013-01-06 18:08:46 +00:00
Stefan Fritsch
8a94c4aa9b
style fixes, add comment
...
no code change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425360 13f79535-47bb-0310-9956-ffa450edef68
2012-12-22 22:29:06 +00:00
Gregg Lewis Smith
d559055384
Fix various clone/edit and search/replace errors
...
in MSVC project files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420975 13f79535-47bb-0310-9956-ffa450edef68
2012-12-12 21:14:57 +00:00
Stefan Fritsch
882f822f02
Don't log a spurious "-" if a request has been rejected
...
before mod_log_forensic could attach its id to it.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693292
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410954 13f79535-47bb-0310-9956-ffa450edef68
2012-11-18 18:42:48 +00:00
Christophe Jaillet
2cf5acd15f
s/;;/;/
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1397636 13f79535-47bb-0310-9956-ffa450edef68
2012-10-12 16:41:34 +00:00
Guenter Knauf
7814748ab3
NetWare build tweaks.
...
Make more use of internal makefile macros;
axed now obsolete include paths.
Submitted by: normw gknw net.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371177 13f79535-47bb-0310-9956-ffa450edef68
2012-08-09 12:11:09 +00:00
Stefan Fritsch
fe4f92509b
Replace use of apr_file_write() with apr_file_write_full() to prevent
...
incomplete writes.
Add comments in some places where error handling/logging is missing.
PR: 53131.
Submitted by: Nicolas Viennot <apache viennot biz>, Stefan Fritsch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331110 13f79535-47bb-0310-9956-ffa450edef68
2012-04-26 21:44:51 +00:00
Greg Ames
456c7d6148
PR 53104 - %{abc}C truncates cookies whose values contain '='
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1328133 13f79535-47bb-0310-9956-ffa450edef68
2012-04-19 22:20:34 +00:00
Joe Orton
99c2e21af4
* modules/loggers/mod_log_debug.c: Mark private globals as static.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1326980 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 08:07:11 +00:00
Stefan Fritsch
cfccfe5aea
Check during config test that directories for access logs exist
...
PR 29941
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1243651 13f79535-47bb-0310-9956-ffa450edef68
2012-02-13 18:50:16 +00:00
Stefan Fritsch
066712a8cd
SECURITY: CVE-2012-0021 (cve.mitre.org)
...
Fix segfault when trying to log a nameless valueless cookie
PR: 52256
Submitted by: Rainer Canavan <rainer-apache 7val com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1225380 13f79535-47bb-0310-9956-ffa450edef68
2011-12-28 23:15:04 +00:00
Graham Leggett
cb21a0dbcc
Further clarify the naming of the entity that directly connects to us by
...
calling that entity a client instead of a peer.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214015 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 01:10:52 +00:00
Graham Leggett
2af2fa44ad
Further clarify the naming of the entity that originates the request by
...
calling that entity a useragent instead of a client.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214003 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 00:31:51 +00:00
Stefan Fritsch
26d5fb7164
Add some more log message tags
...
Remove some log message tags from ap_log_* calls that log lots of
different error messages, in particular the config parsing errors.
Not sure how we should handle those.
ssl_util.c: Downgrade some dynamic locking messages from level DEBUG
to TRACE1-3
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210252 13f79535-47bb-0310-9956-ffa450edef68
2011-12-04 22:09:24 +00:00
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
Graham Leggett
394e5594d6
Introduce a per connection "peer_ip" and a per request "client_ip" to
...
distinguish between the raw IP address of the connection and the effective
IP address of the request.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:42:04 +00:00
Graham Leggett
4ee7eea4cf
Introduce a per request version of the remote IP address, which can be
...
optionally modified by a module when the effective IP of the client
is not the same as the real IP of the client (such as a load balancer).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204968 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 13:10:39 +00:00
Stefan Fritsch
6c57e61b1b
Unify syntax of config directives taking an expression as optional contition argument
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1197413 13f79535-47bb-0310-9956-ffa450edef68
2011-11-04 07:27:07 +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
Jim Jagielski
103f776c25
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@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
Rich Bowen
0084dd7fc6
Removes the CookieLog directive, which has been documented as deprecated for more than a decade.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172625 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 13:40:08 +00:00
Guenter Knauf
03d2437edb
Added forgfotten .dsp bits - my bad.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1148078 13f79535-47bb-0310-9956-ffa450edef68
2011-07-18 22:31:04 +00:00
Stefan Fritsch
32d9e326ef
adjustments of build priorities of modules without special dependencies
...
all -> most:
- mod_sed
reallyall -> most:
- mod_log_debug
reallyall -> all:
- mod_dav_lock
- mod_echo
- mod_charset_lite
- mod_slotmem_plain
- mod_dialup
few -> all:
- mod_data
- mod_reflector
- mod_asis
most -> all:
- mod_heartbeat
- mod_heartmonitor
- mod_watchdog
most -> reallyall:
- mod_imagemap
- mod_cern_meta
- mod_ident
See thread at
http://mail-archives.apache.org/mod_mbox/httpd-dev/201107.mbox/%3C201107052321.56063.sf@sfritsch.de%3E
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146227 13f79535-47bb-0310-9956-ffa450edef68
2011-07-13 18:59:28 +00:00
Guenter Knauf
7c43e70b6a
Fixed Win32 build.
...
Submitted by Gregg L. Smith <gls gknw.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1143309 13f79535-47bb-0310-9956-ffa450edef68
2011-07-06 09:26:10 +00:00
Guenter Knauf
340935398f
Stupid CodeWarrior compiler cant initialize structs with vars.
...
Submitted by NormW <normw gknw.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1143304 13f79535-47bb-0310-9956-ffa450edef68
2011-07-06 09:19:50 +00:00
Guenter Knauf
da7f4cc610
Added mod_log_debug to NetWare build.
...
Submitted by NormW <normw gknw.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1143303 13f79535-47bb-0310-9956-ffa450edef68
2011-07-06 09:18:53 +00:00
Stefan Fritsch
3a2ff33757
Add new non-default debugging module mod_log_debug
...
It allows to log custom debug messages at various phases in the request
processing and is the first consumer of the new string-valued ap_expr API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142170 13f79535-47bb-0310-9956-ffa450edef68
2011-07-02 08:30:38 +00:00
Stefan Fritsch
46d4791a5d
Add string valued expressions to ap_expr, do some API cleanup
...
- add possibility to have expressions that evaluate to a string and not to
a boolean value
- modify ap_expr_parse_cmd() interface to support this and make it more
convenient to use in general
- rename AP_EXPR_FLAGS_* to AP_EXPR_FLAG_* for consistency
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142164 13f79535-47bb-0310-9956-ffa450edef68
2011-07-02 07:45:00 +00:00
Stefan Fritsch
51226bdcca
Fix various "variable 'x' set but not used" warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125877 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 07:42:18 +00:00
Guenter Knauf
888ec80125
Use a var INSTALLBASE to simplify NetWare installation rules.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 04:56:06 +00:00
Guenter Knauf
bab978c56e
Use var for prelude so its possible to change it at one place.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082811 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 03:09:27 +00:00
Jim Jagielski
5be9e95be8
Close PR 50861 where enabling and disabling of buffered
...
logs can cause a segfault. Patch by: Torsten Förtsch <torsten.foertsch@gmx.net >
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082518 13f79535-47bb-0310-9956-ffa450edef68
2011-03-17 15:04:08 +00:00
Guenter Knauf
e8a8becc0f
NetWare build overhaul in order to compile on Linux.
...
Removed absolute paths to imp files.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079487 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 18:59:02 +00:00
Guenter Knauf
46b7e1d210
NetWare build overhaul in order to compile on Linux.
...
Take 1.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079407 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 16:04:40 +00:00
Stefan Fritsch
b6649687a3
More ap_expr updates:
...
- minor bump for ap_expr_exec_re() introduced in r1037504
- actually commit the changes to allow using backreferences in SetEnvIfExpr
- automatically add the correct entries to the Vary-header if the result of
an expression evaluation depends on a request header
(can be turned off by setting the AP_EXPR_FLAGS_DONT_VARY flag)
- set AP_EXPR_FLAGS_DONT_VARY in mod_log_config's conditional logging
- fix various off-by-one errors in req_table_func
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037540 13f79535-47bb-0310-9956-ffa450edef68
2010-11-21 19:51:41 +00:00
Stefan Fritsch
aa5d9268f3
detab
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037143 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 09:13:18 +00:00
Stefan Fritsch
c40fa87ce7
Log errors/infos during expression evaluation and associate the message
...
with the module that is calling ap_expr_exec()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037140 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 08:59:50 +00:00
Stefan Fritsch
60d6e32249
Add support for conditional logging depending on an expression.
...
The syntax is a bit unwieldy, the quotes have to start before
the 'expr=':
CustomLog "logs/cond_log" combined "expr=req('User-Agent') == 'x'"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033157 13f79535-47bb-0310-9956-ffa450edef68
2010-11-09 18:59:33 +00:00