If in settings.php you have a base url that includes a port, e.g. http://foo.com, the referrer substring parsing in the subscription.module behaves badly, sending a goto of something like 'e/234' instead of 'node/234'. If the port was something like :8080, who knows what would happen :-)

Comments

arthurf’s picture

Status: Active » Postponed (maintainer needs more info)

can you give me a bit more detail on what the issue is and where it's taking place?

mattmackenzie’s picture

At or about ln 1011...

 //  determine return location
  if(is_null($_SERVER['HTTP_REFERER'])){
    $rtnloc = "node/$node->nid";
  } else {
  if(variable_get('clean_url', 0) == 1){  // clean URLs on
      global $base_url;
    // extract $base_url from $_SERVER['HTTP_REFERER']
    $istart = strlen($base_url) + 1;
    $rtnloc = substr($_SERVER['HTTP_REFERER'],$istart);
  }else {
    // split $_SERVER['HTTP_REFERER'] at "q="
    if(strpos($_SERVER['HTTP_REFERER'],'q=')>0){
      $istart = strpos($_SERVER['HTTP_REFERER'], 'q='+2);
    }else{
        $istart = 0;
    }
    $rtnloc = substr($_SERVER['HTTP_REFERER'],$istart);
  }
    $return = $_SERVER['HTTP_REFERER'];
  } // end determine return location

The code is not written to handle cases where a port is present in the URL, e.g. http://foo.com:81/drupal

bdragon’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

There is no way this was not fixed by chx's complete rewrite. Closing outright.