Repository navigation
Commit 15beddf
[2.4.x] Merge changes to mod_dav (#1090)
* modules/dav/fs/repos.c (dav_fs_get_resource): Return a 404 rather
than a 400 where r->path_info is not empty for a file; a valid but
unsatisfiable request to a path which cannot exist,
e.g. /dav/foo.txt/blah where /dav/foo.txt is not a directory.
Github: closes #465
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919580 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit a288cd3)
mod_dav: Fix error handling for dav_fs_dir_file_name():
dav_fs_dir_file_name() will not set *fname_p to NULL on failure,
and all callers of dav_fs_dir_file_name() does not check the
return value of dav_fs_dir_file_name(), which could lead to an
undefined behavior against fname_p.
Fix this by adding return value check of dav_fs_dir_file_name()
Submitted by: Zhou Qingyang <zhou1615 umn.edu>
Github: closes #309
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923813 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 1e298dd)
* modules/dav/fs/repos.c (dav_fs_copymove_file): Log the pathname when
opening the source or destination file fails.
Suggested by: Bingyu Shen <ahshenbingyu gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: closes #143, closes #760
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938296 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 1c838de)
Merge r1939146 from trunk (test changes already on 2.4.x):
mod_dav: Do not advertise disabled TRACE
dav_method_options() builds its own Allow field and unconditionally
advertised TRACE for existing DAV resources, even when TraceEnable was
off.
Respect TraceEnable when constructing the DAV Allow field.
PR: 70264
GitHub: closes #827
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939146 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 261058f)
mod_dav: Enforce the lock-owner check on the untagged If: fallback too (#889)
dav_find_submitted_locktoken() scans the whole If: header for a usable
locktoken without checking whether the lock belongs to the authenticated
user. dav_validate_resource_state() repeats that owner check itself on the
tagged-list path, but not here, so a non-matching If: tag (one whose URI
does not apply to the resource) forces the untagged fallback and lets an
authenticated writer use another user's locktoken.
Factor the existing owner check out into dav_lock_owned_by_other_user() and
call it from dav_find_submitted_locktoken() as well: a lock owned by
another user is skipped during the scan instead of being treated as a
usable match. The scan continues past the skip, so a header that
legitimately carries the current user's own token - under any tag, or none
- still succeeds.
* modules/dav/main/util.c (dav_lock_owned_by_other_user): New.
(dav_find_submitted_locktoken): Take request_rec and skip a lock owned by
another user. Both call sites updated.
(dav_validate_resource_state): Use the new helper; no behaviour change.
(cherry picked from commit 9a9457f)
mod_dav: Ignore negated lock tokens when checking for a submitted token:
* modules/dav/main/util.c (dav_find_submitted_locktoken): Skip
states with a "Not" condition.
* test/modules/dav/test_006_if_not_locktoken.py: New test.
* changes-entries/dav-if-not-locktoken.txt: New file.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit d7ed293)
mod_dav: XML-quote core property values taken from the subrequest:
* modules/dav/main/props.c (dav_insert_coreprop): Quote the
getcontenttype and getcontentlanguage values.
* test/modules/dav/test_007_propfind_quoting.py: New test.
* changes-entries/dav-propfind-quoting.txt: New file.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit c58a6f2)
* test/modules/dav/test_002_options_trace.py
(TestOptionsTraceDisabled.test_dav_002_001): Mark as backported in
2.4.72.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test/modules/dav/test_007_propfind_quoting.py
(TestDavPropfindQuoting._class_scope): Set DavLockDB, which has no
default in 2.4.x.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Arturo Bernal <abernal@apache.org>
Co-authored-by: Manfred Kaiser <manfred.kaiser@logfile.at>1 parent b8e005d commit 15beddf
10 files changed
Lines changed: 213 additions & 16 deletions
File tree
- changes-entries
- modules/dav
- fs
- main
- test/modules/dav
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
| 368 | + | |
367 | 369 | | |
368 | 370 | | |
369 | 371 | | |
| |||
375 | 377 | | |
376 | 378 | | |
377 | 379 | | |
| 380 | + | |
| 381 | + | |
378 | 382 | | |
379 | 383 | | |
380 | 384 | | |
| |||
569 | 573 | | |
570 | 574 | | |
571 | 575 | | |
572 | | - | |
573 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
574 | 583 | | |
575 | 584 | | |
576 | 585 | | |
| |||
618 | 627 | | |
619 | 628 | | |
620 | 629 | | |
| 630 | + | |
621 | 631 | | |
622 | 632 | | |
623 | 633 | | |
624 | 634 | | |
625 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
626 | 638 | | |
627 | 639 | | |
628 | 640 | | |
| |||
797 | 809 | | |
798 | 810 | | |
799 | 811 | | |
800 | | - | |
| 812 | + | |
801 | 813 | | |
802 | 814 | | |
803 | | - | |
| 815 | + | |
804 | 816 | | |
805 | 817 | | |
806 | 818 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1698 | 1698 | | |
1699 | 1699 | | |
1700 | 1700 | | |
| 1701 | + | |
| 1702 | + | |
1701 | 1703 | | |
1702 | 1704 | | |
1703 | 1705 | | |
| |||
1829 | 1831 | | |
1830 | 1832 | | |
1831 | 1833 | | |
1832 | | - | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
1833 | 1837 | | |
1834 | 1838 | | |
1835 | 1839 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
| 403 | + | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
| |||
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | | - | |
| 416 | + | |
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
893 | 893 | | |
894 | 894 | | |
895 | 895 | | |
896 | | - | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
897 | 908 | | |
898 | 909 | | |
899 | 910 | | |
| |||
904 | 915 | | |
905 | 916 | | |
906 | 917 | | |
907 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
908 | 921 | | |
909 | 922 | | |
910 | 923 | | |
| |||
924 | 937 | | |
925 | 938 | | |
926 | 939 | | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
927 | 944 | | |
928 | 945 | | |
929 | 946 | | |
| |||
1313 | 1330 | | |
1314 | 1331 | | |
1315 | 1332 | | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
| 1333 | + | |
1319 | 1334 | | |
1320 | 1335 | | |
1321 | 1336 | | |
| |||
1433 | 1448 | | |
1434 | 1449 | | |
1435 | 1450 | | |
1436 | | - | |
| 1451 | + | |
1437 | 1452 | | |
1438 | 1453 | | |
1439 | 1454 | | |
| |||
1493 | 1508 | | |
1494 | 1509 | | |
1495 | 1510 | | |
1496 | | - | |
| 1511 | + | |
1497 | 1512 | | |
1498 | 1513 | | |
1499 | 1514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
0 commit comments