b5d2f5e34e
* modules/generators/mod_autoindex.c (dsortf): Ensure the function
...
is transitive to avoid undefined behaviour, per:
https://www.qualys.com/2024/01/30/qsort.txt
Submitted by: Kuan-Wei Chiu <visitorckw gmail.com>
Github: closes #500
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1922994 13f79535-47bb-0310-9956-ffa450edef68
2025-01-08 18:00:29 +00:00
fbe782e6c4
* Follow up to r1918814: Strings are from configuration and thus trusted
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918823 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 11:19:45 +00:00
9c14928e79
add IndexForbiddenReturn404 to help silence scanners
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894455 13f79535-47bb-0310-9956-ffa450edef68
2021-10-21 18:52:48 +00:00
2e4c19c2e3
Fix a compilation error in maintainer mode and be consistent with 'make_autoindex_entry()'
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1882232 13f79535-47bb-0310-9956-ffa450edef68
2020-10-04 08:59:45 +00:00
4d82ec085b
Save a few bytes of memory in mod_autoindex
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1882231 13f79535-47bb-0310-9956-ffa450edef68
2020-10-04 08:33:52 +00:00
4c79fd280d
Add ap_normalize_path() to replace ap_getparents() (with options).
...
include/httpd.h: Declare ap_normalize_path() and flags.
AP_NORMALIZE_ALLOW_RELATIVE:
Don't require that the path be absolute as per RFC 7230.
This is needed for lookup subrequests.
AP_NORMALIZE_NOT_ABOVE_ROOT:
Check that directory traversal ("..") don't go above root, or
initial directory with relative paths.
AP_NORMALIZE_DECODE_UNRESERVED:
Decode unreserved characters (like '.') first since they have
the same semantics encoded and decoded.
AP_NORMALIZE_MERGE_SLASHES:
Merge multiple slahes into a single one.
AP_NORMALIZE_DROP_PARAMETERS:
Ignore path parameters (";foo=bar"). Not used by httpd but since
ap_normalize_path() is taken from mod_jk's jk_servlet_normalize()
it can allow them to use the upstream version now.
server/util.c: Implement ap_normalize_path().
modules/dav/main/util.c: Replace call to ap_getparents() using
ap_normalize_path() with AP_NORMALIZE_DECODE_UNRESERVED flag since
the path comes from an obsolute URL (thus potentially %-encoded).
modules/generators/mod_autoindex.c: Replace call to ap_getparents() using
ap_normalize_path() with AP_NORMALIZE_ALLOW_RELATIVE and
AP_NORMALIZE_NOT_ABOVE_ROOT flags to be consistent with original code.
include/ap_mmn.h: MINOR bump for ap_normalize_path().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879074 13f79535-47bb-0310-9956-ffa450edef68
2020-06-22 10:29:27 +00:00
f461bcf12c
Add missing pool tags to help debugging.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876599 13f79535-47bb-0310-9956-ffa450edef68
2020-04-16 12:32:33 +00:00
fbecdc0f1e
PR62989: DOCTYPE tags in server-generated HTML.
...
Submitted By: Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873397 13f79535-47bb-0310-9956-ffa450edef68
2020-01-31 02:38:05 +00:00
5811344b04
no strncasecmp because flag has no value
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788451 13f79535-47bb-0310-9956-ffa450edef68
2017-03-24 14:09:52 +00:00
4c3dc1b748
Use 'ap_cstr_casecmp' to simplify code.
...
Remove useless case. We know that to can not be NULL at this point.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788033 13f79535-47bb-0310-9956-ffa450edef68
2017-03-21 23:08:27 +00:00
efcbe82095
Save a few bytes in the conf pool.
...
'push_item' and 'add_alt' already duplicate their parameters, so we can safely use the temp_pool here.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788032 13f79535-47bb-0310-9956-ffa450edef68
2017-03-21 23:05:52 +00:00
3eb2a25d55
update comments post-r1787525
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1787553 13f79535-47bb-0310-9956-ffa450edef68
2017-03-18 12:51:28 +00:00
e87d66b81e
Add IndexOptions UseOldDateFormat
...
*) mod_autoindex: Add IndexOptions UseOldDateFormat to allow the date
format from 2.2 in the Last Modified column. PR60846.
PR34014 / r903052 changed date format for autoindex
Submitted By: Hank Ibell <hwibell gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1787525 13f79535-47bb-0310-9956-ffa450edef68
2017-03-18 02:51:02 +00:00
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
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
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
c80e6b2a34
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715876 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:46:01 +00:00
3c9ddf44bf
Revert r1715789: will re-commit without spurious functional changes.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715869 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:28:36 +00:00
29843dc73f
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
...
[Reverted by r1715869]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715789 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 12:33:09 +00:00
68131d85a4
Fix some style issues on files that can easily be synch'ed with 2.4.x
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705983 13f79535-47bb-0310-9956-ffa450edef68
2015-09-30 08:35:35 +00:00
6085de039a
allow autoindex w/o mod_dir/mod_mime setting the DIR_MAGIC_TYPE.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701436 13f79535-47bb-0310-9956-ffa450edef68
2015-09-06 02:04:30 +00:00
d9a3b78926
s/\<\(\w\+\)\>\s\+\<\1\>/\1/g
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1690137 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 18:07:50 +00:00
cded18be8c
Add class attributes for empty descriptions
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1648201 13f79535-47bb-0310-9956-ffa450edef68
2014-12-28 13:43:25 +00:00
b854d7e818
Remove some 'register' in variable declaration.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1610366 13f79535-47bb-0310-9956-ffa450edef68
2014-07-14 09:05:27 +00:00
431eeb164d
Reduce stack usage, 32 bytes are enough here, no need to
...
take 8k in the stack. (19 would be enough, but be safe...)
Use the size of the buffer as opposed to MAX_STRING_LEN.
Followup to r1491221+r1491479: change consistently
the same code used in another place in the same file.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491538 13f79535-47bb-0310-9956-ffa450edef68
2013-06-10 17:46:53 +00:00
5ac83f071f
Use the size of the buffer as opposed to MAX_STRING_LEN.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491479 13f79535-47bb-0310-9956-ffa450edef68
2013-06-10 14:49:26 +00:00
9710c6287f
Reduce stack usage, 32 bytes are enough here, no need to take 8k in the stack. (19 would be enough, but be safe...)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491221 13f79535-47bb-0310-9956-ffa450edef68
2013-06-09 13:52:17 +00:00
e5e91f8315
Use ap_rputs instead of ap_rvputs where applicable.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418524 13f79535-47bb-0310-9956-ffa450edef68
2012-12-07 22:31:40 +00:00
940259c95d
No need to test for NULL before calling apr_pstrdup.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1398025 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 06:54:36 +00:00
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
76f782e188
Various code cleanup to avoid compiler, cppcheck, or clang warnings:
...
modules/debugging/mod_firehose.c: Make some internal functions static
(to do: logs_cleanup() is unused)
modules/filters/mod_charset_lite.c: Remove dead assignments
modules/filters/mod_include.c: likewise
modules/metadata/mod_usertrack.c: likewise
modules/proxy/mod_proxy_ftp.c: likewise
modules/ssl/ssl_engine_pphrase.c: likewise
modules/proxy/mod_proxy_balancer.c: likewise;
Remove NULL check that can never happen
modules/proxy/proxy_util.c: Axe NULL-check that can never happen and if it
would, it would just mask another bug
os/unix/unixd.c: likewise
modules/http/http_filters.c: Remove sub-condition that is always true
modules/lua/mod_lua.c: Add default cases to switch statements
modules/generators/mod_autoindex.c: Unsigned value can never be < 0
server/util_expr_eval.c: Fix compiler warnings with VC and on OS2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1220493 13f79535-47bb-0310-9956-ffa450edef68
2011-12-18 17:52:59 +00:00
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
04d5492b0b
roll back pair of recent autoindex changes (1204355:1204306)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204356 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 05:12:12 +00:00
a109706a9e
PR51471: IndexIgnore doesn't work in DirectoryMatch.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204341 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 03:29:12 +00:00
6c2475f70e
PR39923: Allow AddDescription to work with absolute filesystem paths,
...
by not adding "*/" to their prefix (intended for relative paths)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204307 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 01:03:15 +00:00
1951a037bf
More cleanup: Expand tabs and some more indentation fixes
...
No functional change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
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
b1b5e91608
improve (but preserve searchable parts of) the error message when Options
...
-Indexes is about to trigger a 403 in mod_autoindex, with a pointer
to mod_dir about how the DirectoryIndex might have been the real culprit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147339 13f79535-47bb-0310-9956-ffa450edef68
2011-07-15 22:32:42 +00:00
782c711893
fix some dead assignments found by the clang analyzer
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1098162 13f79535-47bb-0310-9956-ffa450edef68
2011-04-30 21:18:58 +00:00
08309dbff6
PR#24243: allow some control over how IndexIgnore'd files are merged.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042209 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 16:23:02 +00:00
025ffd8686
PR#47766 mod_autoindex directives not merged into sections with no autoindex directives.
...
This is due to an empty "opts" field looking just like one that has specified "None". None is always
alone, so simplify and test for equality.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031430 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 04:45:21 +00:00
ebb62867fb
Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
...
advantage of per-module loglevels
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
aba233e29d
Folks, this is not C++. Please, pay attention to your patches
...
and don't leave trunk deliberately broken.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@906357 13f79535-47bb-0310-9956-ffa450edef68
2010-02-04 04:19:13 +00:00
ba38707a86
* Make autoindex.t from perl testframework work again
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903794 13f79535-47bb-0310-9956-ffa450edef68
2010-01-27 19:46:00 +00:00
e7cb3d2c94
* Remove unused variable to silence compiler warning
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903748 13f79535-47bb-0310-9956-ffa450edef68
2010-01-27 17:30:10 +00:00
d008bbe604
Use correct comment style.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903302 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 16:19:51 +00:00
ecdfd66e6e
Applies the patch provided in ticket 34014, enhancing the CSS abilities
...
of mod_autoindex. Documentation to follow momentarily.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903052 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 02:25:04 +00:00
3aff695f71
Such macros exist for a reason :)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@901558 13f79535-47bb-0310-9956-ffa450edef68
2010-01-21 06:33:05 +00:00
159afce72a
Initialize variable to avoid compiler warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894370 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 12:39:23 +00:00
36d32b4998
Adds alternating CSS classes to table rows for trendy striped table
...
support.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894298 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 02:18:55 +00:00