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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

malcolm_p created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review

The patch makes perfect sense to me. I am changing the 'Status' to 'Needs Review' to get the testbot to run all the automated tests.

jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.