-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Fix exception thrown in subfolders and malformed paths (Fixes #355) #356
Conversation
🩹 Fix canonical redirects on the WordPress REST route 🎨 Add missing types to Bootloader methods 🎨 Utilize the `app` property in Bootloader methods 🎨 Clean up storage directory separators 🧑💻 Properly exclude filtered admin, login, and registration URLs from routing 🧑💻 Improve checking against the WordPress REST route 🧑💻 Bail on routing when route is a direct `.php` file 🚩 Remove the experimental request handler flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I can confirm this fixes the exception thrown on URLs like |
Actually this introduces another bug where a cookie I used to set on a POST request during |
Do you have an easy way I could test/reproduce this? |
I added back the |
It's reproducible with: add_action('wp_loaded', function () {
setcookie('test1', 1, [
'expires' => 0,
'secure' => true,
'path' => COOKIEPATH ? COOKIEPATH : '/',
'domain' => COOKIE_DOMAIN,
]);
setcookie('test2', 1, [
'expires' => 0,
'secure' => true,
'path' => COOKIEPATH ? COOKIEPATH : '/',
'domain' => COOKIE_DOMAIN,
]);
}); Only second cookie gets added. Guess the |
I got a fix implemented for the cookie issue.
class Response {
public function header($key, $values, $replace = true)
} I still replace by default, unless the header is $response->header($header, $value, $header !== 'Set-Cookie'); So we effectively allow multiple |
Fix works for me, E2E tests passing again. |
This hopefully fixes all the issues related to routing from the v4 release.
Change log
app
property in Bootloader methods/properties.php
file🚩 Remove the experimental request handler flag