#51495 closed defect (bug) (fixed)
The code in mod_rewrite_rules() to write to .htaccess is wrong.
| Reported by: | nendeb55 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.6 |
| Component: | Rewrite Rules | Version: | 5.6 |
| Severity: | critical | Keywords: | has-patch |
| Cc: | Focuses: | rest-api |
Description (last modified by )
Code in the rewrite_rules function
<?php $rules .= 'RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]';
1.There are no newlines, so the next line comes after it.
1.The .* - in is not ^(.*) - in RewriteRule.
Change History (10)
#1
@
6 years ago
- Focuses rest-api added
- Keywords needs-testing added
- Milestone Awaiting Review → 5.6
#3
@
6 years ago
Thanks for the report! I'll get a pr/patch together this afternoon/evening. Kid wrangling solo atm. :)
This ticket was mentioned in PR #584 on WordPress/wordpress-develop by georgestephanis.
6 years ago
#4
- Keywords has-patch added; needs-patch removed
I didn't add the suggested parentheses, as I don't believe they are necessary to do the regex capture, and the prior working art for this seemed to run perfectly without them -- https://github.com/WordPress/application-passwords/wiki/Basic-Authorization-Header----Missing
Trac ticket: https://core.trac.wordpress.org/ticket/51495
This ticket was mentioned in Slack in #core-passwords by georgestephanis. View the logs.
6 years ago
#6
@
6 years ago
updated the pr after a minor oops in the first pass, should be a-ok now. :)
I skipped the parentheses as noted in the PR as we're not using them for capture so they shouldn't be needed here.
#8
@
6 years ago
- Summary The code in mod_rewrite_rules() to write to .htaccsess is wrong. → The code in mod_rewrite_rules() to write to .htaccess is wrong.
TimothyBJacobs commented on PR #584:
6 years ago
#10
Merged in 405a561.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the report.
This change was introduced in [49109] / #42790. @georgestephanis @timothyblynjacobs can you take a look?