1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

336 Commits

Author SHA1 Message Date
Ian Holsman
eea38d7c2e This patch changes the apr_table_elts macro so that it provides
access to the internals of an apr_table_t via a const pointer
instead of the current non-const pointer.


Submitted by:	Brian Pane <BPane@pacbell.net>
Reviewed by:	Ian Holsman


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91860 13f79535-47bb-0310-9956-ffa450edef68
2001-11-11 22:31:04 +00:00
William A. Rowe Jr
61f021ac41 Reading commit log messages can be very helpful for noting inconsistent
comments... no code is hurt in this commit


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91623 13f79535-47bb-0310-9956-ffa450edef68
2001-10-21 17:56:36 +00:00
William A. Rowe Jr
4afd061ef1 The test of filename[0] == '/' is very evil ;)
More patches required to;

    1. use apr_filepath_merge rather than apr_pstrcat for creating proper
       and canonical paths.

    2. untangle the proxy: fooness that no longer works in directory_walk.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91622 13f79535-47bb-0310-9956-ffa450edef68
2001-10-21 17:48:21 +00:00
William A. Rowe Jr
9234f5368e Thread saftey lock for mod_rewrite's cache... I'm sure others will have
some 'better ideas' but this will work for now.

Submitted by: Brian Pane <bpane@pacbell.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91612 13f79535-47bb-0310-9956-ffa450edef68
2001-10-21 01:24:35 +00:00
Jeff Trawick
c216c2184a fix some homophonic issues in comments, as well as some
mispelings found near "its" or "it's"

(helping our 4th grader with homework, couldn't help but
grep)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90173 13f79535-47bb-0310-9956-ffa450edef68
2001-08-15 21:11:59 +00:00
Jeff Trawick
ca28a793ab mod_rewrite: Fix the line ending on some non-Unix systems for
messages written to the rewrite log.

Submitted by: Richard Labennett <rlabenn@us.ibm.com>
Reviewed by:  Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90001 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 19:34:58 +00:00
William A. Rowe Jr
5ccc4eb814 Some cast magic for intentional float/int transformations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89711 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 21:12:45 +00:00
William A. Rowe Jr
1501c81198 Remove last public vestigages of APR_INHERIT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89600 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 19:41:20 +00:00
William A. Rowe Jr
1fa29a8d2d Obvious files that need inheritance, correct me if I'm wrong.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89561 13f79535-47bb-0310-9956-ffa450edef68
2001-07-16 21:07:40 +00:00
Ken Coar
2b54256b59 Bring forward the NOESCAPE flag from 1.3..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89158 13f79535-47bb-0310-9956-ffa450edef68
2001-05-18 18:38:42 +00:00
Chuck Murcko
93463cfc17 This is a fix that went into v1.3 quite a while back, but not into v2.0.
It sorts out the problem when a password protected reverse proxy URL
sends a Proxy-Authenticate to a browser instead of a WWW-Authenticate.

This patch covers the changes to the httpd-2.0 tree.

Submitted by:	Graham Leggett
Reviewed by:	Chuck Murcko


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88527 13f79535-47bb-0310-9956-ffa450edef68
2001-03-16 07:28:08 +00:00
Jeff Trawick
d3dcba691d tweak ap_get_remote_host() so that the caller can find out if she got
back an IP address

mod_access needed to know this, but the old code didn't handle IPv6


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88484 13f79535-47bb-0310-9956-ffa450edef68
2001-03-09 20:30:34 +00:00
Jeff Trawick
01dd97bd88 Fix some APR-ization issues:
1) we're using an apr_time_t file mtime, but trying to fit it in
   a time_t entry in the cache and in parameters to the cache
   access routines; use apr_time_t everywhere

2) we need to use apr_fileperms_t instead of mode_t for APR
   file permissions

PR:		6980


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88443 13f79535-47bb-0310-9956-ffa450edef68
2001-03-03 01:46:16 +00:00
Roy T. Fielding
7b1b30525b Intermediate change of hardcoded "helpers" reference to "build"
until I get a chance to revamp this to use APR's variables directly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88230 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 16:07:31 +00:00
Greg Stein
dd9b08e321 *) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
   new one, but over time we should be better)

*) Propagate the new type to all appropriate functions.

*) Random cleaning, whitespace, stylistic nits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88225 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 02:58:53 +00:00
Roy T. Fielding
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
Doug MacEachern
ac5b27b86d doh. need a spellchekker for these rename scripts. s/apr_lock_aquire/apr_lock_acquire/g;
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88150 13f79535-47bb-0310-9956-ffa450edef68
2001-02-13 23:32:28 +00:00
Greg Stein
dc44adee51 include "apr_signal.h" when needed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88082 13f79535-47bb-0310-9956-ffa450edef68
2001-02-11 01:09:02 +00:00
Greg Stein
bb282b75f7 Clean up some of the includes:
- explicitly include apr_lib.h since ap_config.h doesn't
- use apr_want.h where possible
- use APR_HAVE_ where possible
- remove some unneeded includes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88060 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 13:05:29 +00:00
Doug MacEachern
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
Tony Finch
2cc359a377 MF 1.3 the fis for the mod_rewrite stupidity.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87939 13f79535-47bb-0310-9956-ffa450edef68
2001-02-01 10:03:42 +00:00
William A. Rowe Jr
d038b40a6f Fix the remaining APR_FINFO_NORM occurances. Again, followup is needed
to actually test any field outside the scope of APR_FINFO_MIN.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87935 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 23:11:05 +00:00
Jeff Trawick
df144ca74a get mod_rewrite to compile with xlc on AIX; it still compiles with
gcc, of course


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87906 13f79535-47bb-0310-9956-ffa450edef68
2001-01-29 16:36:26 +00:00
William A. Rowe Jr
7fe3af6ae4 *) Adopt apr user/group name features for mod_rewrite. Eliminates some
'extra' stat's for user/group since they should never occur, and now
     resolves the SCRIPT_USER and SCRIPT_GROUP, including on WinNT NTFS
     volumes.

  No-one commented on loosing the 'stat' calls, can anyone invent a scenario
  where they could be required?  Also, I don't like the casts either, so if
  you have a better solution, don't whine, just fix it :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87904 13f79535-47bb-0310-9956-ffa450edef68
2001-01-29 00:03:11 +00:00
William A. Rowe Jr
cd1ef027c2 The changes required for the APR_FINFO_wanted argument to
apr_stat/lstat/getfileinfo.  These are -NOT- optimal, they
  are simply the required changes to get the server working.
  The size of the patch is a warning about how we need to
  really look at what we are trying to accomplish with all
  of these stat/lstat calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87760 13f79535-47bb-0310-9956-ffa450edef68
2001-01-20 21:42:23 +00:00
William A. Rowe Jr
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +00:00
Tony Finch
9ea289f20a Bring forward from 1.3:
I broke mod_rewrite by modifying strings in place when expanding them,
because variable lookups can cause subrequests which cause mod_rewrite
to do its stuff again including an expansion on the same string, which
is then syntactically invalid. So copy the lookup keys somewhere else
before using them in such a way that may cause recursion.

In addition to this, my parser could also be confused by complicated
nested rewrite map expansions like ${map1:${map2:key|dflt}|dflt} so
fix that too by keeping track of {} when looking for |.

PR:             7087


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87723 13f79535-47bb-0310-9956-ffa450edef68
2001-01-18 22:36:58 +00:00
William A. Rowe Jr
40655f8641 Provide apr_pool_t arg to register_hooks, since anything they do in that
step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 15:52:12 +00:00
Doug MacEachern
40391fb9f2 adjust remaining modules to use the new handler hook method (Alan Edwards)
bring back the old handler prototype by reusing r->handler (dougm)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87617 13f79535-47bb-0310-9956-ffa450edef68
2001-01-08 23:55:12 +00:00
Jeff Trawick
de8bb3686b Pass a valid pool to apr_create_lock().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87574 13f79535-47bb-0310-9956-ffa450edef68
2001-01-03 16:47:02 +00:00
Jeff Trawick
22a2fa9ddb Get mod_rewrite to work as a DSO by changing the way it
keeps track of whether or not its post config hook has
been called before.  Instead of a static variable (which
is replaced when the DSO is loaded a second time), use
userdata in the process pool.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87328 13f79535-47bb-0310-9956-ffa450edef68
2000-12-13 13:03:32 +00:00
Jeff Trawick
a6978fb91e include <strings.h> for the strcasecmp() and strncasecmp() prototypes;
AIX doesn't have prototypes for these in string.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87149 13f79535-47bb-0310-9956-ffa450edef68
2000-12-01 21:49:26 +00:00
Jeff Trawick
706c56e631 Use #if APR_HAVE_xyz_H, not #ifdef APR_HAVE_xyz_H
Submitted by:	Brian Havard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87090 13f79535-47bb-0310-9956-ffa450edef68
2000-11-27 16:40:13 +00:00
Jeff Trawick
ee3c11ef88 use the APR feature test macro to check for sys/uio.h; it is the
only one defined and it is used in other Apache code;
this gets mod_rewrite to compile on RedHat 6.0 (and perhaps some
other systems)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87088 13f79535-47bb-0310-9956-ffa450edef68
2000-11-27 15:50:26 +00:00
Greg Stein
d0968eb9af add the "next filter" parameter to the rest of the ap_sub_req_* calls.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87076 13f79535-47bb-0310-9956-ffa450edef68
2000-11-23 13:03:46 +00:00
William A. Rowe Jr
46fdec3977 Win32 symlink (NTFS Junction) support for mod_rewrite
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86940 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 18:11:12 +00:00
Jeff Trawick
30fbbe1cc4 Change mod_rewrite's tilde expansion to use apr_get_home_directory().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86935 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 04:12:28 +00:00
Jeff Trawick
85815fec74 Clean up some of the warnings from a Tru64 build, mostly due to
the recent apr_ssize_t->apr_size_t changes.  The problem in mod_cgid
was an int function which didn't have a return statement.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86934 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 03:50:16 +00:00
Ryan Bloom
fbca1dff0c remove a thread un-safe function from mod_rewrite
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86914 13f79535-47bb-0310-9956-ffa450edef68
2000-11-10 18:42:40 +00:00
Tony Finch
1514234269 Don't truncate the string if a RewriteMap lookup has a syntax error.
Submitted by:   erik quanstrom <quanstro@clark.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86758 13f79535-47bb-0310-9956-ffa450edef68
2000-10-28 03:06:22 +00:00
Jeff Trawick
56a50e52a5 Back out the suexec change to mod_rewrite.c. It now builds again.
(No, it wasn't a simple issue to get the suexec patch working.)

The suexec support doesn't apply to the external mapping process,
which is not related to any particular request.  Instead, [IMHO]
the external mapping process should switch to the configured user/group
that the daemon processes switch to.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86729 13f79535-47bb-0310-9956-ffa450edef68
2000-10-24 11:38:06 +00:00
Manoj Kasichainula
b1fb90877e Add back suexec support.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86712 13f79535-47bb-0310-9956-ffa450edef68
2000-10-23 15:30:57 +00:00
Jeff Trawick
12c00a6a88 Fix a compile error in mod_rewrite.c.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86641 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 12:30:07 +00:00
Tony Finch
edddcdeda0 Restore functionality broken by the mod_rewrite security fix:
rewrite map lookup keys and default values are now expanded
so that the lookup can depend on the requested URI etc.

Because the new code is recursive you can now write configurations
like the following (with nested map lookups) which wasn't directly
possible before -- you had to use a RewriteCond and a %N backref
instead, as in http://www.apache.org/docs/vhosts/mass.html#xtra-conf

RewriteMap tolower int:tolower
RewriteMap host2user txt:/home/www/conf/virtusertbl
RewriteRule /(.*) /home/${host2user:${tolower:%{HTTP_HOST}}|www}/public_html

PR: 6671


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86638 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 04:50:25 +00:00
William A. Rowe Jr
d6490633eb Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 06:05:15 +00:00
Tony Finch
11149ed807 Fix a security problem that affects certain configurations of mod_rewrite.
If the result of a RewriteRule is a filename that contains expansion
specifiers, especially regexp backreferences $0..$9 and %0..%9, then it
may be possible for an attacker to access any file on the web server.
The fix replaces a multi-pass string expander with a one-pass expander,
and includes the code quality improvements that were committed separately
to 1.3.

Message-Id: <E13OQB5-0004Xs-00@hand.dotat.at>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86302 13f79535-47bb-0310-9956-ffa450edef68
2000-09-23 00:05:45 +00:00
Jeff Trawick
74dd3ddc14 Fix some bad calls to ap_log_rerror() in mod_rewrite. In some places,
errno was passed as the APR error code.  In other places, 0 was passed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86124 13f79535-47bb-0310-9956-ffa450edef68
2000-08-21 19:09:01 +00:00
Jeff Trawick
ca817f473c Change the rewrite log lock from intra-process to lock-all (and we really can
log it if it fails).

Don't segfault if RewriteLock wasn't coded in the config (i.e., if
rewrite_log_lock isn't set).

Fix a missing error code in a call to ap_log_error().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86058 13f79535-47bb-0310-9956-ffa450edef68
2000-08-12 02:31:38 +00:00
William A. Rowe Jr
1a9db204f5 Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86008 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 06:07:53 +00:00
Jeff Trawick
03585c8240 Clean up maintainer-mode compiles of mod_rewrite (use AP_INIT_xx macros
and clean up resulting warnings).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85980 13f79535-47bb-0310-9956-ffa450edef68
2000-08-03 03:09:32 +00:00