wordpress-develop/tests/phpunit/tests/canonical
Aaron Jorbin fe1df4023c Media: Redirect inactive attachment pages for logged-out users.
Ensure logged out users are redirected to the media file when attachment pages are inactive. This removes the read_post capability check from the canonical redirects as anonymous users lack the permission.

This was previously committed in [57310] before being reverted in [57318]. This update includes a fix to cover instances where revealing a URL could be considered a data leak and greatly expands the unit tests to ensure that this is covered along with many other instances.

Follow-up to [56657], [56658], [56711], [57310], [57318].

Props peterwilsoncc, jorbin, afercia, aristath, chesio, joppuyo, jorbin, lakshmananphp, poena, sergeybiryukov, swissspidy, johnbillion.
Fixes #59866.
See #57913.


git-svn-id: https://develop.svn.wordpress.org/trunk@57357 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-25 17:34:54 +00:00
..
category.php Tests: Improve the @group annotation accuracy and consistency. 2023-10-19 13:51:04 +00:00
customRules.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
https.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
noRewrite.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
paged.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
pageOnFront.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
postStatus.php Media: Redirect inactive attachment pages for logged-out users. 2024-01-25 17:34:54 +00:00
robots.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:30:38 +00:00
sitemaps.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
stripFragmentFromUrl.php Tests: Improve the @group annotation accuracy and consistency. 2023-10-19 13:51:04 +00:00