Commit Graph

56 Commits

Author SHA1 Message Date
48b5dfd696 core: Add ap_unescape_url_ex() for better decoding control, and deprecate
unused AP_NORMALIZE_DROP_PARAMETERS flag.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893971 13f79535-47bb-0310-9956-ffa450edef68
2021-10-07 12:00:20 +00:00
85760859ca Fix spelling errors found by codespell. [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873985 13f79535-47bb-0310-9956-ffa450edef68
2020-02-13 18:15:57 +00:00
5528a9b36f Provide TEST_CHAR marco in test_char.h
For (internal) usage outside server/util.c, mod_log_forensic for now
and mod_cache (T_HTTP_TOKEN_STOP) in a few...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1856490 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 16:24:30 +00:00
84ce5d25db Dropped the never-released ap_has_cntrls() as it had very limited
and inefficient application at that, added ap_scan_vchar_obstext()
to accomplish a similar purpose.

Dropped HttpProtocolOptions StrictURL option, this will be better
handled in the future with a specific directive and perhaps multiple
levels of scrutiny, use ap_scan_vchar_obstext() to simply ensure there
are no control characters or whitespace within the URI.

Changed the scanning of the response header table by check_headers()
to follow the same rulesets as reading request headers. Disallow any
CTL character within a response header value, and any CTL or whitespace
in response header field name, even in strict mode.

Apply HttpProtocolOptions Strict to chunk header parsing, invalid
whitespace is invalid, line termination must follow CRLF convention.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1764961 13f79535-47bb-0310-9956-ffa450edef68
2016-10-14 20:48:43 +00:00
40538b21a3 Review of IE 11, Firefox 48 and Chrome 53 all indicate that ';' URI characters
are transmitted unencoded, per RFC3986 section 3.3 grammer. Correct httpd's
behavior to not encode ';' in proxied URI's or Location: response headers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1760444 13f79535-47bb-0310-9956-ffa450edef68
2016-09-12 20:15:26 +00:00
3a1ebf13ac Yann is correct, % is distinct from reserved and unreserved
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757062 13f79535-47bb-0310-9956-ffa450edef68
2016-08-21 16:12:49 +00:00
862eeb83d3 Surpress noise about syntax
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756978 13f79535-47bb-0310-9956-ffa450edef68
2016-08-20 00:53:38 +00:00
b9a6a0ee7b Introduce StrictURI|UnsafeURI for RFC3986 enforcement
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756959 13f79535-47bb-0310-9956-ffa450edef68
2016-08-19 19:48:58 +00:00
c80679d596 After lengthy investigation with covener's assistance, it seems we cannot
use a static table. We cannot change this to dynamic use of the local iconv
without build changes to avoid such use on cross-platform builds.

I'm satisfied if we trust iscntrl to at least catch all the most lethal
C0 Ctrls (we are promised it catches bad carriage control/line endings)
and leave this in the short term with an XXX to revisit at a future time.

The token stop never needed this table, because we can use the affirmative
list of token characters to define it.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756946 13f79535-47bb-0310-9956-ffa450edef68
2016-08-19 17:24:27 +00:00
12d873689c Generally, the cart comes before the horse, this mirrors apr_lib.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756937 13f79535-47bb-0310-9956-ffa450edef68
2016-08-19 16:34:14 +00:00
94860bb4ff Resolve Netware (and other arch) build error for non-portable isascii()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756934 13f79535-47bb-0310-9956-ffa450edef68
2016-08-19 16:31:05 +00:00
51fa28757b A band-aid to resolve an immediate IBM MVS'ism
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756849 13f79535-47bb-0310-9956-ffa450edef68
2016-08-18 20:41:27 +00:00
d79b514c4b Fix spelling in comments and text files.
No functional change.
PR 59990


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 19:50:02 +00:00
4cdf495718 Replacement solution to identify VCHAR/ASCII symbols, even in EBCDIC.
Looking for someone with an EBCDIC environment to post the output of
the test_char.h generated file for verification.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754579 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 22:00:52 +00:00
49bca2c2fa Friendly catch by Rüdiger, restore line mis-removed by the previous commit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754568 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 20:08:56 +00:00
c2b68779ac Leave an emphatic TODO per Jeff's observations
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754555 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 17:36:34 +00:00
d627f5d16a Introduce T_HTTP_CTRLS for efficiently finding non-text chars
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754540 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 15:49:02 +00:00
c46a8d2ba9 Be more explicit about NUL in case iscntrl is inconsistent
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754539 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 15:40:15 +00:00
261a4baa00 Correct T_HTTP_TOKEN_STOP per RFC2068 (2.2) - RFC7230 (3.2.6),
which has always defined 'token' as CHAR or VCHAR - visible USASCII only.

NUL char is also a stop, end of parsing.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754538 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 15:35:56 +00:00
e3be6c9bf6 Improve legibility of reviewing the generated table, using hex rather than dec
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754536 13f79535-47bb-0310-9956-ffa450edef68
2016-07-29 15:24:39 +00:00
7fa1a7c928 Fixed position of the NEED_ENHANCED_ESCAPES define.
This define should be outside of the else case so that it
gets also defined if we cross-compile for Win32 or OS2.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1330189 13f79535-47bb-0310-9956-ffa450edef68
2012-04-25 10:36:37 +00:00
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
17ca53578e Small cleanup and macro rename to make clearer for what it is.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1001398 13f79535-47bb-0310-9956-ffa450edef68
2010-09-26 10:04:39 +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
1dcb7a36d2 removed useless comments added with r795438.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795440 13f79535-47bb-0310-9956-ffa450edef68
2009-07-18 22:21:57 +00:00
4280a3e7ed enabled building gen_test_char for running on build when cross-compiling;
this does not change code for any platform unless CROSS_COMPILE is defined.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795438 13f79535-47bb-0310-9956-ffa450edef68
2009-07-18 21:51:21 +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
8b84c1a8aa gen_test_char: add double-quote to the list of T_HTTP_TOKEN_STOP.
PR: 9727
Submitted by: Ville Skytt <ville.skytta iki.fi>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@655714 13f79535-47bb-0310-9956-ffa450edef68
2008-05-13 02:51:06 +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
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
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
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
79bd8e5fc9 Make handling of 0 back compatible.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102162 13f79535-47bb-0310-9956-ffa450edef68
2004-01-03 17:29:57 +00:00
512ea75174 typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102159 13f79535-47bb-0310-9956-ffa450edef68
2004-01-03 16:36:05 +00:00
9936f62aaa Make forensic logging safe for POST data. The issue with strchr and NUL is
a red herring.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102158 13f79535-47bb-0310-9956-ffa450edef68
2004-01-03 16:31:32 +00:00
b2d154535b Make forensic logging EBCDIC-safe.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102153 13f79535-47bb-0310-9956-ffa450edef68
2004-01-03 15:33:41 +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
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
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
af88e88ef9 get the strchr() declaration
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94578 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 11:12:10 +00:00
0184900aea Compiler/platform bogosity is apr's job.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94568 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 07:18:00 +00:00
9f94a00016 Err, that was a bit redundant. Eliminate the redundant test [and clean
up some tabs I inadvertantly introduced.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94118 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 05:52:16 +00:00
029da7dc7b Correct our list of escape characters to include percent and the
carriage return on Win32/OS2, and modify the \r \n escaping to account
  for the fact that Win32/OS2 don't pass these characters through a true
  argv[] mechansim; replace them with a whitespace since they effectively
  are for most applications.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94070 13f79535-47bb-0310-9956-ffa450edef68
2002-03-21 05:28:14 +00:00
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
17cc70b4ab Sander's Stylistic Submission
(de-tab)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93717 13f79535-47bb-0310-9956-ffa450edef68
2002-03-05 20:43:24 +00:00
16ffdd12cb remove unneeded include
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92612 13f79535-47bb-0310-9956-ffa450edef68
2001-12-26 22:00:01 +00:00
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00