Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Issue Summary
The WebformSubscriber::onRespondRedirectEntityAccess checks for route parameters using Url::getRouteParameters() however, this function throws an exception for unrouted urls. I've observed that this can cause 403 responses from custom controllers to throw an exception:
UnexpectedValueException: External URLs do not have internal route parameters. in Drupal\Core\Url->getRouteParameters()
Proposed Resolution
The attached patch adds a check for a routed url to avoid the exception currently being thrown.
Comment | File | Size | Author |
---|---|---|---|
webform_subscriber_unrouted.patch | 581 bytes | malcolm_p | |
|
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe patch makes perfect sense to me. I am changing the 'Status' to 'Needs Review' to get the testbot to run all the automated tests.
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented