In redirect.admin.inc, the redirect_element_validate_redirect function contains code that seemingly does nothing.

It sets $value twice, to two different items, without using the variable in between the two definitions.

It checks to see if $value is not equal to '<front>', but earlier it passes the value through drupal_get_normal_path(), which modifies '<front>' to an empty string.

This was discovered when I was trying to exempt <front> from validation in my patch for #2327247: Validate internal URLs so redirects cannot lead to 404 pages.

Comments

kpaxman’s picture

Issue summary: View changes