GithubHelp home page GithubHelp logo

Comments (6)

lekoala avatar lekoala commented on July 2, 2024 1

@maxime-rainville i don't agree it's low priority, this can break things in unexpected ways!

i think the issue is due to Director::absoluteUrl() usage instead of what was in place before

lekoala@21c9c13

this fixes the issue but maybe it should be considered that Director::absoluteUrl shouldn't try to rewrite an url that is working fine

in the meantime, i'm having a static utility doing this

    public static function redirect(string $url, int $code = 302): HTTPResponse
    {
        $response = new HTTPResponse();
        return $response->redirect($url, $code);
    }

it's really odd to have to do that :-)

from silverstripe-framework.

maxime-rainville avatar maxime-rainville commented on July 2, 2024

I agree that Controller::redirect() should probably respect whatever choice the developer hard coding the link made.

But I'm not sure this would have any practical impact, so I'm disinclined to prioritise this issue. Is there a scenario where this could lead to a problem for the end user?

from silverstripe-framework.

brasileric avatar brasileric commented on July 2, 2024

I agree that Controller::redirect() should probably respect whatever choice the developer hard coding the link made.

But I'm not sure this would have any practical impact, so I'm disinclined to prioritise this issue. Is there a scenario where this could lead to a problem for the end user?

Hi Maxime. Thanks for your response. In most cases this will not be a problem I agree. But I have a redirect that goes to an affiliate link which is not working when added a trailing slash. I realize this is an issue on the side of the affiliate platform as well.

I agree with the low priority.

from silverstripe-framework.

brasileric avatar brasileric commented on July 2, 2024

I'm experiencing a problem with some api authentication as well. Like:

https://login.daisycon.com/oauth/authorize?response_type=code&client_id=

Is changing to:

https://login.daisycon.com/oauth/authorize/?response_type=code&client_id=

And refused by the api.

from silverstripe-framework.

lekoala avatar lekoala commented on July 2, 2024

just realised the same, spent 30 minutes troubleshooting why my openid provider wasn't working as expected because silverstripe decided to add a slash at the end of the redirect url...

from silverstripe-framework.

johannesx75 avatar johannesx75 commented on July 2, 2024

@maxime-rainville please reconsider the low impact rating.

This breaks things with external services that are hard to trace and debug. For us it was "Sign in with Apple".

from silverstripe-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.