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

163 Commits

Author SHA1 Message Date
Nick Kew
4d815c29d1 Reinstate location walk for subrequests
PR 41960 (Jose Kahan)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@579664 13f79535-47bb-0310-9956-ffa450edef68
2007-09-26 14:26:19 +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
Bradley Nicholes
2874d54f16 re-introduce ap_satisfies API back into core and modify how the access_checker, check_user_id and auth_checker hooks are called so that they respect the precedence that is set through the satisfy ALL/ANY directive. This also restores the directives order, allow, deny, satisfyas supported directives rather than being deprecated. These directives still remain in mod_access_compat however.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@534533 13f79535-47bb-0310-9956-ffa450edef68
2007-05-02 16:31:39 +00:00
Sander Temme
8aaea15506 Detab
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@522084 13f79535-47bb-0310-9956-ffa450edef68
2007-03-24 18:22:35 +00:00
Nick Kew
8da719ecea PR#41829 - Torsten Förtsch
Fix uninitialised var in server/request.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@522011 13f79535-47bb-0310-9956-ffa450edef68
2007-03-24 12:58:40 +00:00
Ruediger Pluem
36ca0ac794 * If APR_FINFO_NAME is added to the list of wanted information, apr_stat
always returns APR_INCOMPLETE on Unix platforms in the case that the
  call to the native stat / lstat did not fail. So we can safely assume
  that the stat / lstat call has been successful in this case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@491297 13f79535-47bb-0310-9956-ffa450edef68
2006-12-30 20:07:14 +00:00
Paul Querna
4794b34ea9 Improve the error message, include the full path of the file we are actually trying to call stat on.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@490920 13f79535-47bb-0310-9956-ffa450edef68
2006-12-29 05:27:49 +00:00
Ruediger Pluem
0255874634 * Although the lstat call should rarely ever fail, because we stat'ed the
same file several lines above, check the return value to be save that
  nothing bad happens in the case it does fail.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425394 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 13:40:32 +00:00
Ruediger Pluem
f1c497a222 * Fix typo. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425057 13f79535-47bb-0310-9956-ffa450edef68
2006-07-24 14:09:27 +00:00
Ruediger Pluem
356d882a5d * Check for symbolic links of the target file in the optimized case that we
had already done this specific directory walk for this request. This can
  happen when we have an internal redirect, like the ones caused by mod_dir
  (/ -> index.html). See also

  http://mail-archives.apache.org/mod_mbox/httpd-dev/200607.mbox/%3c44B5521F.8050906@globalvanet.com%3e

Reviewed by: wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@423886 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 11:01:07 +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
Garrett Rooney
668a5863a7 Make some error checking more clear by using the defined constants instead
of literal values.

Patch by: Dan Rall <dlr apache.org>

* server/request.c
  (ap_process_request_internal): Check the return value of hook functions
   against the constant OK instead of the magic number 0 to improve clarity.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@368505 13f79535-47bb-0310-9956-ffa450edef68
2006-01-12 22:51:00 +00:00
Bradley Nicholes
9fed4c73d7 Authz refactoring
Merge from branches/authz-dev

Basically here is a list of what has been done:
- Convert all of the authz modules from hook based to provider based
- Remove the ap_requires field from the core_dir_config structure
- Remove the function ap_requires() since its functionality is no
longer supported or necessary in the refactoring
- Remove the calls to ap_some_auth_required() in the core request
handling to allow the  hooks to be called in all cases.
- Add the new module mod_authz_core which will act as the authorization
provider vector and contain common authz directives such as 'Require',
'Reject' and  '<RequireAlias>'
- Add the new module mod_authn_core which will contain common
authentication directives such as 'AuthType', 'AuthName' and
'<AuthnProviderAlias>'
- Move the check for METHOD_MASK out of the authz providers and into
the authz_core provider vector
- Define the status codes that can be returned by the authz providers
as AUTHZ_DENIED,  AUTHZ_GRANTED and AUTHZ_GENERAL_ERROR   
- Remove the 'Satisfy' directive 
- Implement the '<RequireAll>', '<RequireOne>' block directives  to
handle the 'and' and 'or' logic for authorization.
- Remove the 'AuthzXXXAuthoritative' directives from all of the authz
providers
- Implement the 'Reject' directive that will deny authorization if the
argument is true
- Fold the 'Reject' directive into the '<RequireAll>', '<RequireOne>'
logic
- Reimplement the host based authorization functionality provided by 
'allow', 'deny' and 'order' as authz providers   
- Remove the 'allow', 'deny' and 'order' directives      
- Merge mod_authn_alias into mod_authn_core
- Add '<RequireAlias>' functionality which is similar to
'<AuthnProviderAlias>' but specific to authorization aliasing
- Remove all of the references to the 'authzxxxAuthoritative'
directives from the documentation
- Remove the 'Satisfy' directive from the documentation
- Remove 'Allow', 'Deny', 'Order' directives from the documentation
- Document '<RequireAll>', '<RequireOne>', 'Reject' directives
- Reimplement the APIs ap_auth_type(), ap_auth_name() as optional
functions and move the  actual implementation into mod_authn_core
- Reimplement the API ap_some_auth_required() as an optional function
and move the  actual implementation into mod_authz_core

Major Changes:
- Added the directives <RequireAll>, <RequireOne>, <RequireAlias>,
Reject
- Expanded the functionality of the directive 'Require' to handle all
authorization and access control
- Added the new authz providers 'env', 'ip', 'host', 'all' to handle
host-based access control
- Removed the directives 'Allow', 'Deny', 'Order', 'Satisfy',
'AuthzXXXAuthoritative'
- Removed the ap_require() API
- Moved the directives 'AuthType', 'AuthName' out of mod_core and into
mod_authn_core
- Moved the directive 'Require' out of mod_core and into
mod_authz_core
- Merged mod_authn_alias into mod_authn_core
- Renamed mod_authz_dbm authz providers from 'group' and 'file-group'
to 'dbm-group' and 'dbm-file-group'

Benefits:
- All authorization and access control is now handle through two
directives, 'Require' and 'Reject'
- Authorization has been expanded to allow for complex 'AND/OR' control
logic through the directives '<RequireAll>' and '<RequireOne>'
- Configuration is now much simpler and consistent across the board
- Other modules like mod_ssl and mod_proxy should be able to plug into
and take advantage of  the same provider based authorization mechanism
by implementing their own providers

Issues:
- Backwards compatibility between 2.2 and 2.3 configurations will be
broken in the area  of authorization and access control due to the fact
that the directives 'allow', 'deny',  'order' and 'satisfy' have been
removed.  When moving from 2.2 to 2.3 these directives  will have to be
changed to 'Require all granted', 'Require all denied' or some variation
 of the authz host-based providers.
- Existing third party authorization modules will have to adapt to the
new structure.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@368027 13f79535-47bb-0310-9956-ffa450edef68
2006-01-11 14:30:28 +00:00
Jim Jagielski
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
Jim Jagielski
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
William A. Rowe Jr
62d58df5ca Pay close attention to core_create_req() ... and note
that not one other member of the r->vars is initialized
  herein.  Move this initialization elsewhere.

  (If this is the 'default' - it really aught to be the
  zero value, for that matter).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@295141 13f79535-47bb-0310-9956-ffa450edef68
2005-10-05 23:37:53 +00:00
Colm MacCarthaigh
05c9c13006 Initialise a variable, to avoid a gcc warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@293364 13f79535-47bb-0310-9956-ffa450edef68
2005-10-03 15:14:13 +00:00
Colm MacCarthaigh
f2bcdddae0 When doing a subrequest lookup, do not lookup using the quickhandler if
next_filter is NULL, since this implies that the subrequest will be
internal_fast_redirect'ed or will never be called. See line request.c:1513
onwards (in make_sub_request) also.  


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@291914 13f79535-47bb-0310-9956-ffa450edef68
2005-09-27 11:52:14 +00:00
Joe Orton
9b6e07b561 * server/request.c (core_opts_merge): When AllowOverride is specified
for the directory, ignore the inherited override_opts field.

PR: 35330
Submitted by: kabe <kabe sra-tohoku.co.jp>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@291120 13f79535-47bb-0310-9956-ffa450edef68
2005-09-23 14:11:18 +00:00
Joshua Slive
f154e2b3b2 Any failure in apr_stat on a symlink currently gives
"Symbolic link not allowed", which results in much head-scratching
if the actual problem is a broken link of some sort.  The real
fix would be to propogate the correct apr_stat error into the
error log, but that would require more refactoring than I'm
prepared to do.  This change simply expands the error message
to include both possibilities.  It improves the situation for
PR28515 but does not solve it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@280018 13f79535-47bb-0310-9956-ffa450edef68
2005-09-10 16:36:37 +00:00
Ian Holsman
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +00:00
Joe Orton
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
Justin Erenkrantz
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
Roy T. Fielding
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
Allan K. Edwards
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
Erik Abele
438accf0f9 Minor comment fixes, no code changes:
- 'sub request' -> 'subrequest'
  - @retrn -> @return
  - ...

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105408 13f79535-47bb-0310-9956-ffa450edef68
2004-10-11 19:27:29 +00:00
Stas Bekman
0226c056ec use more intuitive variable names
ap_sub_req_*_uri  to use new_uri
ap_sub_req_*_file to use new_file

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104758 13f79535-47bb-0310-9956-ffa450edef68
2004-08-20 20:58:49 +00:00
Paul Querna
9d66007aa2 Added 'AllowOverride Options=Indexes,MultiViews' to give an admin better
control over what options can be used in .htaccess files.

PR: 29310
Submitted by: Tom Alsberg <alsbergt-apache cs.huji.ac.il>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104283 13f79535-47bb-0310-9956-ffa450edef68
2004-07-14 06:36:42 +00:00
André Malo
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
André Malo
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
André Malo
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
André Malo
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
Jeff Trawick
0beaea8979 spell check
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101822 13f79535-47bb-0310-9956-ffa450edef68
2003-11-20 21:31:59 +00:00
André Malo
1a7767b782 Let mod_autoindex show filenames containing special chars like %.
PR: 13598


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101659 13f79535-47bb-0310-9956-ffa450edef68
2003-11-01 22:29:42 +00:00
Jeff Trawick
45384da23b tag the pools created for requests and subrequests
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101441 13f79535-47bb-0310-9956-ffa450edef68
2003-10-13 23:43:00 +00:00
Jeff Trawick
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
André Malo
8dd8543053 Rework of the recursion stopper - collapse recursion counters into one function
Reviewed by: Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100095 13f79535-47bb-0310-9956-ffa450edef68
2003-05-29 23:04:32 +00:00
André Malo
1af02389bb Prevent the server from crashing when entering infinite loops. The
new LimitInternalRecursion directive configures limits of subsequent
internal redirects and nested subrequests, after which the request
will be aborted.
[William Rowe, Jeff Trawick, Andr� Malo]

PR: 19753 (and probably others)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99911 13f79535-47bb-0310-9956-ffa450edef68
2003-05-19 01:19:55 +00:00
André Malo
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
André Malo
53b508b387 Fix "Satisfy Any" logic. The access_checker has nothing to do with
auth_type.

Related PR: 9076


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98516 13f79535-47bb-0310-9956-ffa450edef68
2003-01-28 15:57:38 +00:00
Ken Coar
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
William A. Rowe Jr
3aacc89dcb Make the code simpler to follow, and perhaps clear up the follow-symlink
bug reports we have seen on bugzilla.  e.g. 14206 etc.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97891 13f79535-47bb-0310-9956-ffa450edef68
2002-12-12 07:05:54 +00:00
Jeff Trawick
4660d1f011 core_opts_merge() needs to be static
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97385 13f79535-47bb-0310-9956-ffa450edef68
2002-11-03 22:17:32 +00:00
William A. Rowe Jr
a9b4bbe6fe Mr. Trawick was dead on, and this revealed a much bigger bug.
Factor out the opts/override merging (since we do it three times)
  and eliminate all the nasty goto's.  This bug likely caused all
  sorts of dir_walk configuration issues including htaccess issues.
  Also add a few more docs where things aren't so obvious.

PR: 14147


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97380 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 20:49:13 +00:00
Jeff Trawick
e44cb38a9e no such thing as AP_ASSERT()
there is ap_assert() and AP_DEBUG_ASSERT()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97375 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 12:58:30 +00:00
William A. Rowe Jr
22c4e6219f Fix a trailing slash/last filename truncation bug observed on Linux,
which affected DAV MOVE operations and even general file access.
  PR 14147, 10687, 10236 [Dan Good <debug@gooddan.com>]

  I'm accepting Jeff Trawick's suggestion of twisting the test into an
  assert, since it seems very unlikely (after correctly resetting the flag)
  that this will fault.

Reviewed by:  Jeff Trawick, Will Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97366 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 03:27:20 +00:00
Ken Coar
cc2449327a i hate it when tha happens..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97303 13f79535-47bb-0310-9956-ffa450edef68
2002-10-25 16:38:11 +00:00
Ken Coar
7392d9042a more info is better than less..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97302 13f79535-47bb-0310-9956-ffa450edef68
2002-10-25 16:27:38 +00:00
Justin Erenkrantz
b902cb08f8 Morph DONE result from a sub-request handler to OK as DONE is only relevant
when we are the main request.

This fixes a problem with mod_include printing out an error message on DAV
sub-requests because mod_dav will return DONE instead of OK.  This would
result in the correct output merged in with an error string.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96642 13f79535-47bb-0310-9956-ffa450edef68
2002-09-05 06:59:14 +00:00