aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_confirm.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-12 02:58:29 -0700
committerFriendika <info@friendika.com>2011-08-12 02:58:29 -0700
commitfda593caeda997fbd97eed28f69107ce91c16242 (patch)
tree8eb1b2b73a04766498fbdc489db001b8a431a23c /mod/dfrn_confirm.php
parent0db145dafa032a8c1fd68c318afc59f9599f3756 (diff)
downloadvolse-hubzilla-fda593caeda997fbd97eed28f69107ce91c16242.tar.gz
volse-hubzilla-fda593caeda997fbd97eed28f69107ce91c16242.tar.bz2
volse-hubzilla-fda593caeda997fbd97eed28f69107ce91c16242.zip
introduction fails if confirmation differs by http vs https
Diffstat (limited to 'mod/dfrn_confirm.php')
-rw-r--r--mod/dfrn_confirm.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index 869bde3bf..bcc4e3438 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -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'];