]> git.mxchange.org Git - friendica.git/commitdiff
introduction fails if confirmation differs by http vs https
authorFriendika <info@friendika.com>
Fri, 12 Aug 2011 09:58:29 +0000 (02:58 -0700)
committerFriendika <info@friendika.com>
Fri, 12 Aug 2011 09:58:29 +0000 (02:58 -0700)
boot.php
mod/dfrn_confirm.php
mod/probe.php [new file with mode: 0644]
mod/webfinger.php

index ea304b1e8cc6e10f6ac12413058a69a27029fe40..0a8a2fd8422d9ea1e2848c6dda8b429e4f2e4250 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -7,7 +7,7 @@ require_once('include/text.php');
 require_once("include/pgettext.php");
 
 
-define ( 'FRIENDIKA_VERSION',      '2.2.1068' );
+define ( 'FRIENDIKA_VERSION',      '2.2.1069' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1079      );
 
index 869bde3bf11928bbae7aecf2ed461da22c082f12..bcc4e3438c6d1099ee44786fc844d6676794d5ab 100644 (file)
@@ -528,12 +528,22 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
                        dbesc($decrypted_source_url),
                        intval($local_uid)
                );
-
                if(! count($ret)) {
-                       // this is either a bogus confirmation (?) or we deleted the original introduction.
-                       $message = t('Contact record was not found for you on our site.');
-                       xml_status(3,$message);
-                       return; // NOTREACHED 
+                       if(strstr($decrypted_source_url,'http:'))
+                               $newurl = str_replace('http:','https:',$decrypted_source_url);
+                       else
+                               $newurl = str_replace('https:','http:',$decrypted_source_url);
+
+                       $ret = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1",
+                               dbesc($newurl),
+                               intval($local_uid)
+                       );
+                       if(! count($r)) {
+                               // this is either a bogus confirmation (?) or we deleted the original introduction.
+                               $message = t('Contact record was not found for you on our site.');
+                               xml_status(3,$message);
+                               return; // NOTREACHED 
+                       }
                }
 
                $relation = $ret[0]['rel'];
diff --git a/mod/probe.php b/mod/probe.php
new file mode 100644 (file)
index 0000000..221d186
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+require_once('include/Scrape.php');
+
+function probe_content(&$a) {
+
+       $o .= '<h3>Probe Diagnostic</h3>';
+
+       $o .= '<form action="probe" method="get">';
+       $o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] .'" />';
+       $o .= '<input type="submit" name="submit" value="Submit" /></form>'; 
+
+       $o .= '<br /><br />';
+
+       if(x($_GET,'addr')) {
+               $addr = trim($_GET['addr']);
+               $res = probe_url($addr);
+               $o .= '<pre>';
+               $o .= str_replace("\n",'<br />',print_r($res,true));
+               $o .= '</pre>';
+       }
+       return $o;
+}
index f6d6026b406bfd0ce5ce76fddcfbac27574e844a..74bd2c9543c6ceda125719b075f1fe08f7845c08 100644 (file)
@@ -23,4 +23,4 @@ function webfinger_content(&$a) {
                $o .= '</pre>';
        }
        return $o;
-}
\ No newline at end of file
+}