Hi,

I work on a site for me and my family that's why, no nodes are accessible to Anonymous users.
I use "Redirect 403" module so that the users have to log on, before seeing the frontpage. Instead of that, when they logs on, they land on the user page...
What to do ?...

Thanks,

Thib

PS: Thanks a lot for this module !!!

Comments

damienmckenna’s picture

Am seeing this too.

damienmckenna’s picture

This is partly a bug in the drupal_goto() function:

function drupal_goto($path = '', $query = NULL, $fragment = NULL, $http_response_code = 302) {
  $destination = FALSE;
  if (isset($_REQUEST['destination'])) {
    $destination = $_REQUEST['destination'];
  }
  else if (isset($_REQUEST['edit']['destination'])) {
    $destination = $_REQUEST['edit']['destination'];
  }
  if ($destination) {
    // Do not redirect to an absolute URL originating from user input.
    $colonpos = strpos($destination, ':');
    $absolute = ($colonpos !== FALSE && !preg_match('![/?#]!', substr($destination, 0, $colonpos)));
    if (!$absolute) {
      extract(parse_url(urldecode($destination)));
    }
  }

The key part is the if($destination) line, which will ignore the "?destination=" query string.

What r4032login needs to do is instead add "?destination=", which does work. Stay tuned for a patch.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new925 bytes
new1015 bytes

Here are patches for the DRUPAL-6--1 and DRUPAL-7--1 branches that fix the problem.

deekayen’s picture

Status: Needs review » Fixed

Committed to DRUPAL-6--1, DRUPAL-7--1, and HEAD.

benjarlett’s picture

Status: Fixed » Needs review

Committed to DRUPAL-6--1, DRUPAL-7--1, and HEAD.
Forgive me if I've missed something, but I've updated this module to latest version and still get this error.. do I have to patch it... I have patch fear.
Thanks.

deekayen’s picture

Are you sure you downloaded the 6.x-1.x-dev release? http://drupal.org/node/316860

I like them to sit in the development release for a couple days before I release a new, tagged stable version.

deekayen’s picture

I changed the implementation of #3 in DRUPAL-7--1 because $_REQUEST seems to be no longer available and ?q= has a value of r4032login.

deekayen’s picture

Status: Needs review » Closed (cannot reproduce)
thib’s picture

Hi,

The patch works for me (D6)
Thanks,

Thib