1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

746 Commits

Author SHA1 Message Date
Christophe Jaillet
be128ce47d Fix some style issues.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1795652 13f79535-47bb-0310-9956-ffa450edef68
2017-05-20 05:11:44 +00:00
Christophe Jaillet
3ed6ed8c02 Add an explicit NULL to initialise a field in an authn_provider structure, as done in all other places. PR 60636
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1795651 13f79535-47bb-0310-9956-ffa450edef68
2017-05-20 05:08:06 +00:00
Yann Ylavic
47daee1579 Follow up to r1772919: update APLOGNO().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783765 13f79535-47bb-0310-9956-ffa450edef68
2017-02-20 14:04:50 +00:00
Jim Jagielski
cc97ce3e52 https://bz.apache.org/bugzilla/show_bug.cgi?id=58855
Optimize check for empty strings


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1778067 13f79535-47bb-0310-9956-ffa450edef68
2017-01-09 22:08:01 +00:00
Jacob Champion
4354842828 mod_auth_digest: fix segfaults during shared memory exhaustion
The apr_rmm_addr_get/apr_rmm_malloc() combination did not correctly
check for a malloc failure, leading to crashes when we ran out of the
limited space provided by AuthDigestShmemSize. This patch replaces all
these calls with a helper function that performs this check.

Additionally, fix a NULL-check bug during entry garbage collection.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1772919 13f79535-47bb-0310-9956-ffa450edef68
2016-12-06 17:07:19 +00:00
Christophe Jaillet
e85d2c7241 Remove unused typedef uthn_dbd_conf
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756846 13f79535-47bb-0310-9956-ffa450edef68
2016-08-18 20:24:20 +00:00
Christophe Jaillet
1e04d72bbc Fix some missed "strcasecmp <--> ap_cstr_casecmp" conversions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756843 13f79535-47bb-0310-9956-ffa450edef68
2016-08-18 20:13:17 +00:00
Rainer Jung
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
Yann Ylavic
da8a9b53dc Revert r1755930: actually what'd be read after AP_FCGI_END_REQUEST is padding,
not any potential/errorneous next response.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1755931 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 10:40:49 +00:00
Yann Ylavic
190d808ea4 mod_{proxy,authnz}_fcgi: follow up to r1750392.
Don't try to read past AP_FCGI_END_REQUEST on the backend side, it would be
a response for the next request.

[Reverted by r1755931]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1755930 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 10:32:35 +00:00
William A. Rowe Jr
f4cc76ee71 Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
2016-06-09 00:06:42 +00:00
Eric Covener
0606a8e246 PR59612: Print the ap_expr() error message when an expression cannot
be evaluated in forward-dns provider.

Submitted By: Tianyin Xu <tixu cs.ucsd.edu>
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1745034 13f79535-47bb-0310-9956-ffa450edef68
2016-05-22 12:03:21 +00:00
Eric Covener
808ecaa24f PR59611: Fix AH02633 require type
Submitted By: Tianyin Xu <tixu cs.ucsd.edu> 
Commited By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1745033 13f79535-47bb-0310-9956-ffa450edef68
2016-05-22 12:00:33 +00:00
Christophe Jaillet
120b35fc61 Fix a comment similar to r1638072
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1739569 13f79535-47bb-0310-9956-ffa450edef68
2016-04-17 10:08:38 +00:00
Christophe Jaillet
9fbfe2fc90 Silent a smatch warning:
mod_auth_form.c:626 get_form_auth() warn: variable dereferenced before check 'sent_user' (see line 616)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734635 13f79535-47bb-0310-9956-ffa450edef68
2016-03-11 21:16:48 +00:00
Fabien Coelho
e61c6977c7 mod_authz_host: add a new "forward-dns" authorization type
This new type does not rely on reverse DNS lookups.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734412 13f79535-47bb-0310-9956-ffa450edef68
2016-03-10 13:33:31 +00:00
Christophe Jaillet
e4c0735413 Use ap_array_str_contains to simplify code
Remove a useless test (groups is always NULL)
Improve some style

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1733691 13f79535-47bb-0310-9956-ffa450edef68
2016-03-05 07:15:55 +00:00
Christophe Jaillet
f2972d5e61 Use ap_array_str_contains to simplify code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1733523 13f79535-47bb-0310-9956-ffa450edef68
2016-03-03 20:57:59 +00:00
Eric Covener
c52f4a83f2 PR59039 Digest not working with ap_expr based AuthName
Stop caching the configured realm during config processing and always
call ap_auth_name(r) to determine (=evaluate potential expression)
the configured realm



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1731662 13f79535-47bb-0310-9956-ffa450edef68
2016-02-22 15:32:40 +00:00
William A. Rowe Jr
690c6105f9 hostname: Test and log useragent_host per-request across various modules,
including the scoreboard, expression and rewrite engines, setenvif,
authz_host, access_compat, custom logging, ssl and REMOTE_HOST variables.
PR55348  [William Rowe]

This is the complete change set which applies cleanly to 2.4.x as well,
the server/scoreboard.c will follow, which does not apply due to drift.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729930 13f79535-47bb-0310-9956-ffa450edef68
2016-02-12 01:17:03 +00:00
Rainer Jung
af14d158a3 Added many log numbers to log statements that
had none.

Those were not detected by the coccinelle script.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725485 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 12:02:41 +00:00
Rainer Jung
44ce30494e Added many log numbers to log statements that
had none.

Handled all files in modules/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:03:18 +00:00
Christophe Jaillet
cb3a54abd7 Do not use the magic string "directory". Use the corresponding global variable as in all other places of the module.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719257 13f79535-47bb-0310-9956-ffa450edef68
2015-12-11 05:13:03 +00:00
Christophe Jaillet
35f0d185a3 Use 'ap_pbase64decode' to simplify code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1716940 13f79535-47bb-0310-9956-ffa450edef68
2015-11-28 06:53:46 +00:00
Yann Ylavic
6f8a850766 Follow up to r1715880: revert abusive ap_casecmpstr[n]() usages.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1716151 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 14:38:54 +00:00
Yann Ylavic
e30575b0b0 More ap_casecmpstr[n]() usages (follow up to r1715876).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715880 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:48:35 +00:00
Christophe Jaillet
bf8b528523 Remove some useless 'return' statements.
Add a blank line between functions.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715582 13f79535-47bb-0310-9956-ffa450edef68
2015-11-21 21:53:25 +00:00
Christophe Jaillet
45a9ac67a4 Constify + save a few bytes in conf pool
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1711553 13f79535-47bb-0310-9956-ffa450edef68
2015-10-30 21:13:07 +00:00
Christophe Jaillet
b3b5296f28 Remove code related to 'AuthDigestEnableQueryStringHack'
This has been undocumented for about 3 years now (see r1415960)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1703305 13f79535-47bb-0310-9956-ffa450edef68
2015-09-15 22:20:45 +00:00
Rich Bowen
85f20cb5d2 s/the the/the/g
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1690120 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 16:01:56 +00:00
Yann Ylavic
54bf3a248e mod_authz_dbd: Avoid a crash when lacking correct DB access permissions. PR 57868.
Submitted by: Jose Kahan <jose w3.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1688660 13f79535-47bb-0310-9956-ffa450edef68
2015-07-01 14:37:00 +00:00
Jan Kaluža
8153365579 * mod_auth_digest: Use anonymous shm by default, fall back on name-based.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684636 13f79535-47bb-0310-9956-ffa450edef68
2015-06-10 10:43:54 +00:00
Christophe Jaillet
d3dd3183e1 Save a few bytes in conf pool
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1683881 13f79535-47bb-0310-9956-ffa450edef68
2015-06-06 05:35:22 +00:00
Christophe Jaillet
17b746fa76 Save a few bytes in conf pool
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1681685 13f79535-47bb-0310-9956-ffa450edef68
2015-05-26 05:57:36 +00:00
Christophe Jaillet
82c1cabec6 Save a few bytes in conf pool and axe a function that duplicates 'ap_set_string_slot'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1681440 13f79535-47bb-0310-9956-ffa450edef68
2015-05-24 12:32:22 +00:00
Yann Ylavic
c1d21475a6 mod_authn_dbd, mod_authz_dbd, mod_session_dbd, mod_rewrite: Fix lifetime
of DB lookup entries independently of the selected DB engine.  PR 46421.

Suggested by: Michel Stam <michel reverze net>
Proposed by: Steven whitson <steven.whitson gmail com>
Reviewed/Extended/Committed by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1679181 13f79535-47bb-0310-9956-ffa450edef68
2015-05-13 11:34:30 +00:00
Rainer Jung
bc41580632 Add missing APLOGNOs by running
docs/log-message-tags/update-log-msg-tags.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1670431 13f79535-47bb-0310-9956-ffa450edef68
2015-03-31 19:07:11 +00:00
William A. Rowe Jr
776ab659a6 Correct MS-DOS check-in crap on text files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669682 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 20:46:11 +00:00
Jan Kaluža
29e741e0d9 * mod_access_compat, mod_authz_host: Handle '#' character.
For mod_access_compat, disable '#' in hostname completely.
For mod_authz_host, treat '#' as a comment and ignore everything after that.
This allows better handling of admin errors like
'Require host localhost# Add example.com later'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1667676 13f79535-47bb-0310-9956-ffa450edef68
2015-03-19 07:46:35 +00:00
Jan Kaluža
8209022131 * mod_authn_dbd: apr_pstrdup dbd_password and dbd_hash to fix use-after-free
bug with postgresql


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1663647 13f79535-47bb-0310-9956-ffa450edef68
2015-03-03 11:12:18 +00:00
Graham Leggett
6f4e16eca6 mod_authn_core: Add expression support to AuthName and AuthType.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1663123 13f79535-47bb-0310-9956-ffa450edef68
2015-03-01 14:37:11 +00:00
Christophe Jaillet
92d6cd6db8 Fix a precedence issue.
The logic is unchanged but 'ret' does not have the expected value. So the logged error message may be incorrect.

+ add some empty lines between functions

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1658567 13f79535-47bb-0310-9956-ffa450edef68
2015-02-09 20:32:18 +00:00
Christophe Jaillet
ea86cb0cfa Fix cut and paste typo in error message + remove empty lines to be consistent
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656549 13f79535-47bb-0310-9956-ffa450edef68
2015-02-02 19:31:37 +00:00
Eric Covener
8dd6f463ed as in r1517366, drop the severity in authz_groupfile when a require
didn't match but no real error was encountered. 

This individual 'require group' may not really dictate who gets in. PR55523 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1654184 13f79535-47bb-0310-9956-ffa450edef68
2015-01-23 12:21:34 +00:00
Rainer Jung
642b344069 Silence compiler warnings:
- modules/aaa/mod_authnz_fcgi.c:705: warning:
  'orspbuflen' may be used uninitialized in this function

- modules/aaa/mod_authnz_fcgi.c:1235: warning:
  comparison is always false due to limited range of data type


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1652829 13f79535-47bb-0310-9956-ffa450edef68
2015-01-18 18:57:53 +00:00
Yann Ylavic
7e2dd53161 mod_authnz_fcgi: we don't need to add the trailing '\0' to parse response headers since r1640036.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640345 13f79535-47bb-0310-9956-ffa450edef68
2014-11-18 13:53:24 +00:00
Yann Ylavic
f9520fec08 mod_proxy_fcgi, mod_authnz_fcgi: stop reading the response and issue an error
when parsing or forwarding the response fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640040 13f79535-47bb-0310-9956-ffa450edef68
2014-11-16 22:25:32 +00:00
Yann Ylavic
54f0797498 mod_proxy_fcgi: SECURITY: CVE-2014-3583 (cve.mitre.org)
Fix a potential crash with response headers' size above 8K.

The code changes to mod_authnz_fcgi keep the handle_headers()
function in sync between the two modules.  mod_authnz_fcgi
does not have this issue because it allocated a separate byte
for terminating '\0'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640036 13f79535-47bb-0310-9956-ffa450edef68
2014-11-16 22:04:39 +00:00
Yann Ylavic
31e1a51f0f Revert r1638818, r1639812, r1639717 and r1639814 for new staging.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640034 13f79535-47bb-0310-9956-ffa450edef68
2014-11-16 21:52:40 +00:00
Yann Ylavic
adf6a11dd1 mod_authnz_fcgi: follow up to r1639717.
Let ap_scan_script_header*() validate the headers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1639814 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 00:37:13 +00:00