Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Forums OroPlatform OroPlatform – Installation/Technical Issues or Problems Redirect to absolute url with protocol

This topic contains 3 replies, has 3 voices, and was last updated by  balmerhevi 1 year, 11 months ago.

  • Creator
    Topic
  • #34711
    lrotherfield
    lrotherfield
    Participant

    We have been struggling to redirect to an absolute URL because isFullRedirect in Oro\Bundle\NavigationBundle\Event\ResponseHashnavListener is only set if the current security token is not an object or a 404/500 response is returned. Am I missing something that I need to add to a redirect response if I actually want to navigate away from the site? Checking for scheme existence in the location header and setting isFullRedirect is working for me for the time being.

    I came across this because I need to redirect to twitter to authenticate my application for the current user if they have not already authenticated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #34712

    bogdan
    Participant

    Hi,

    Thanks for notifying us about the issue, it will be fixed in the next release. To make a hotfix, you can modify vendor/oro/navigation-bundle/Oro/Bundle/NavigationBundle/Resources/public/js/hash.navigation.js and replace checkThirdPartyLink function with the next code`checkThirdPartyLink: function(url) {
    var external = RegExp(‘^(https?:)?//(?!’ + location.host + ‘)’);
    return (url.indexOf(‘http’) !== -1) && external.test(url);
    }`

    #34713
    lrotherfield
    lrotherfield
    Participant

    Brilliant, thanks for the hotfix!

    #34714

    balmerhevi
    Participant

    Check this one, more about…URL Redirection

    Balmer

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No
sso for www.magecore.comsso for oroinc.comsso for oroinc.desso for oroinc.frsso for marketplace.orocommerce.comsso for marketplace.orocrm.com