X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_poll.php;h=334e103079da11956134602988bceaabdd183a1a;hb=35c3e12df53fc0584f1b5231ea6e73a177db3573;hp=a8c27efc17e32c0077a41a889622f48fb9e1bfe4;hpb=2e9dca7c9f0e50956723505ad576bf32e762d11e;p=friendica.git diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index a8c27efc17..334e103079 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -1,11 +1,14 @@ argc > 1)) { + logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] ); header("Content-type: application/atom+xml"); - $o = get_feed_for($a, '*', $a->argv[1],$last_update); + $o = get_feed_for($a, '', $a->argv[1],$last_update); echo $o; killme(); } @@ -70,6 +74,7 @@ function dfrn_poll_init(&$a) { if((int) $xml->status == 1) { $_SESSION['authenticated'] = 1; $_SESSION['visitor_id'] = $r[0]['id']; + $_SESSION['visitor_home'] = $r[0]['url']; notice( $r[0]['username'] . t(' welcomes ') . $r[0]['name'] . EOL); // Visitors get 1 day session. $session_id = session_id(); @@ -96,18 +101,18 @@ function dfrn_poll_init(&$a) { dbesc($sec) ); if(! count($r)) { - xml_status(3); + xml_status(3, 'No ticket'); // NOTREACHED } $orig_id = $r[0]['dfrn_id']; - if(strpos(':',$orig_id)) + if(strpos($orig_id, ':')) $orig_id = substr($orig_id,2); $c = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", intval($r[0]['cid']) ); if(! count($c)) { - xml_status(3); + xml_status(3, 'No profile'); } $contact = $c[0]; @@ -131,9 +136,9 @@ function dfrn_poll_init(&$a) { $final_dfrn_id = substr($final_dfrn_id,2); if($final_dfrn_id != $orig_id) { - + logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG); // did not decode properly - cannot trust this site - xml_status(3); + xml_status(3, 'Bad decryption'); } header("Content-type: text/xml"); @@ -383,6 +388,7 @@ function dfrn_poll_content(&$a) { if(((int) $xml->status == 0) && ($xml->challenge == $hash) && ($xml->sec == $sec)) { $_SESSION['authenticated'] = 1; $_SESSION['visitor_id'] = $r[0]['id']; + $_SESSION['visitor_home'] = $r[0]['url']; notice( $r[0]['username'] . t(' welcomes ') . $r[0]['name'] . EOL); // Visitors get 1 day session. $session_id = session_id();