The include/common.inc states that when $destination is set it should not redirect to an absolute URL originating from user input. Using the login_destination to redirect to another page after login will not be working when you set the destination to e.g. http://www.example.com.

Comments

marsdk’s picture

Using this path will force it to use drupal_goto() instead.

beautifulmind’s picture

Hello,
In next release, you can write to redirect use to front page of the site. So, you will not have to write drupal_goto.

Regards.

marsdk’s picture

Do you mean that I should handle the redirect, when I get sent to the frontpage ?

marsdk’s picture

Oh, I don't have any problems with redirecting to internal URLs (like ?destination=node/23), but as soon as I sent it to an external page (like destination=http://www.somedomain.com) it does not redirect due to code in the common.inc file.

rsvelko’s picture

Issue summary: View changes

using drupal_goto as u propose, breaks many other modules that deal with things related to logins and user registration - content_profile for example. See : http://drupal.org/comment/reply/761254

commit daf53cf commented out the drupal_goto thus in effect removing the "redirect to absolute url" feature.

I think we can have best of both worlds - allowing drupal_goto to be enabled in the settings for people who need it.
But warning them that this will potentially break content_profile and other modules.

So I made it so that we leave it to the user to decide, informing them of the possible consequences.

  • a51ee82 committed on 6.x-2.x
    Issue #1508152 by rsvelko: make usage of drupal_goto settable in...
rsvelko’s picture

Title: Destination cannot be set to absolute URL » Destination cannot be set to absolute URL - make usage of drupal_goto settable in settings
Status: Active » Fixed
rsvelko’s picture

Assigned: Unassigned » rsvelko

Status: Fixed » Closed (fixed)

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