Problem/Motivation

Due to https://www.drupal.org/node/2532212, $this->response should be set to an object of class TrustedRedirectResponse() in the getResponse() method of the payment internal Response class. Otherwise "Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it." will be displayed when using the getResponse method.

CommentFileSizeAuthor
#5 2549553-5.patch739 bytesgiancarlosotelo

Comments

s_leu created an issue. See original summary.

s_leu’s picture

Issue summary: View changes
berdir’s picture

I think returning this as a trusted redirect is fine, since we have to assume that those redirects are going to an external site, are code-provided and therefore as trusted as they can be...

I think this might also be the problem with our current failing tests for some our payment methods.

xano’s picture

Cool, I didn't know about this yet! Would you be able to write a patch for this? I'll be happy to review and commit it under your name when it's done.

giancarlosotelo’s picture

Status: Active » Needs review
StatusFileSize
new739 bytes

Here is a fix for that.

Tests fails because a problem with Unit test but locally were green, I am not sure if I should create a follow-up issue for that.

Status: Needs review » Needs work

The last submitted patch, 5: 2549553-5.patch, failed testing.

LKS90’s picture

Status: Needs work » Needs review

Looking at the output, it looks like this fails because of a dependency on a class from Plugin. I get the same error when I 'remove' plugin before running the test and neither currency nor plugin are listed in the build log.

LKS90’s picture

Status: Needs review » Reviewed & tested by the community

Xano queued 5: 2549553-5.patch for re-testing.

xano’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

  • Xano committed 31f4c53 on 8.x-2.x authored by giancarlosotelo
    Issue #2549553 by giancarlosotelo: Response::getResponse() should use...

Status: Fixed » Closed (fixed)

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