The option to enable or disable the redirect feature positively works replacing the link URL with the internal redirect one, but it is not checked by the redirect controller method, that perform the redirection even if this feature is turned off in configuration.

The /elf/redirect URL should response 404 if the redirection feature is disabled.

Comments

manuel.adan created an issue. See original summary.

manuel.adan’s picture

Assigned: manuel.adan » Unassigned
Status: Active » Needs review
StatusFileSize
new2.1 KB
miroslav-lee’s picture

It works. Thank you!

ddrozdik’s picture

Status: Needs review » Reviewed & tested by the community
ddrozdik’s picture

Thanks, very good catch. Ready to be merged.

ddrozdik’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.39 KB

After applying the patch and reviewing it better in the PhpStorm I noticed that creating ConfigFeactory service is not necessary for the controller because it will be created when the config() method is executed. We can safely simplify the patch and make it lighter.

@manuel.adan take a look please, and if you are ok, I will merge it.

dealancer’s picture

Version: 8.x-1.1 » 8.x-1.x-dev
Status: Needs review » Needs work

Can not apply this patch anymore with a recent dev version.

          
  [Exception]                                                                                                                                                                                   
  Cannot apply patch Ignore redirect requests if the redirection feature is not enabled (https://www.drupal.org/files/issues/2019-02-07/elf-ignore_redirect_when_not_enabled-3006252-6.patch)!