[wp-trac] [WordPress Trac] #51723: App Passwords: Regenerate .htaccess for 5.6
WordPress Trac
noreply at wordpress.org
Tue Nov 17 01:21:23 UTC 2020
#51723: App Passwords: Regenerate .htaccess for 5.6
------------------------------------+--------------------------------
Reporter: TimothyBlynJacobs | Owner: TimothyBlynJacobs
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.6
Component: Login and Registration | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses: rest-api
------------------------------------+--------------------------------
Comment (by pbiron):
Replying to [comment:8 SergeyBiryukov]:
> To summarize a bit, [attachment:"51723.diff"] regenerates the
`.htaccess` file for this specific case, and [attachment:"51723.2.diff"]
would do it for any DB version bump, which may or may not be necessary.
>
> It looks like the consensus in the pre-RC1 bug scrub was to go with
[attachment:"51723.diff"] for now and explore [attachment:"51723.2.diff"]
in a future release.
Yes, the consensus, with which I completely agree, is that this close to
5.6-RC1, the safest thing is to go with [attachment:"51723.diff"].
Here's the rationale (when/if we get around to exploring
[attachment:"51723.2.diff"]) I used when putting that patch together. In
[https://wordpress.slack.com/archives/C02RQBWTW/p1604696364087000 this
slack thread], Sergey says:
> Just bumping `$wp_db_version` to the current commit number is enough to
trigger `flush_rewrite_rules()`
> That's how it was done in [47018] to add the new favicon rewrite rules,
no upgrade routine needed :)
> But `$wp_db_version` is generally bumped for any rewrite rule updates
like this. `flush_rewrite_rules()` does a "hard" flush by default, which
includes updating the .htaccess file.
A few points:
1. the change in [47018] (I now see, I hadn't look at it before) involved
only changes to WP rewrite rules (and didn't need a hard flush)
2. the "rewrite rule updates ''like this''" actually do involve .htaccess
changes
3. since `save_mod_rewrite_rules()` is **not** defined at the time
`flush_rewrite_rules()` is called when `db_updated` is checked, the flush
there has **never** been a "hard" flush. Based on what sergey said in
that thread, I figure that was "bug"...which is fixed by that patch.
So, when/if we come back to this in a future version, ''maybe'' there's a
way we can indicate (in the value for the `db_updated` option) whether a
"hard" flush is needed and do the `require_once` before calling
`flush_rewrite_rules()` only in that case.
Make sense?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51723#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list