]> git.mxchange.org Git - friendica.git/blobdiff - include/redir.php
Merge pull request #2172 from tobiasd/20151212-frosticons
[friendica.git] / include / redir.php
index ba7d02993f86526a9cd33cf180f719aca3025209..ab4f3220cd7d1a1ace36ece544828db9ab96d0a6 100644 (file)
@@ -4,7 +4,7 @@ function auto_redir(&$a, $contact_nick) {
 
        // prevent looping
 
-       if(intval($_REQUEST,'redir'))
+       if(x($_REQUEST,'redir') && intval($_REQUEST['redir']))
                return;
 
        if((! $contact_nick) || ($contact_nick === $a->user['nickname']))
@@ -64,6 +64,12 @@ function auto_redir(&$a, $contact_nick) {
                        $dfrn_id = '0:' . $orig_id;
                }
 
+               // ensure that we've got a valid ID. There may be some edge cases with forums and non-duplex mode
+               // that may have triggered some of the "went to {profile/intro} and got an RSS feed" issues
+
+               if(strlen($dfrn_id) < 3)
+                       return;
+                       
                $sec = random_string();
 
                q("INSERT INTO `profile_check` ( `uid`, `cid`, `dfrn_id`, `sec`, `expire`)