]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_confirm.php
Merge pull request #6204 from annando/escaping
[friendica.git] / mod / dfrn_confirm.php
index 449a39cbbe6803807ff3a8cd3f8cbf83b2c7c4dd..48c8e32e5a431ff1a767c317f7cf1cc0f91b87f4 100644 (file)
@@ -85,7 +85,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
                        $cid      = 0;
                        $hidden   = intval(defaults($handsfree, 'hidden'  , 0));
                } else {
-                       $dfrn_id  = notags(trim(defaults($_POST, 'dfrn_id'   , '')));
+                       $dfrn_id  = Strings::escapeTags(trim(defaults($_POST, 'dfrn_id'   , '')));
                        $intro_id =      intval(defaults($_POST, 'intro_id'  , 0));
                        $duplex   =      intval(defaults($_POST, 'duplex'    , 0));
                        $cid      =      intval(defaults($_POST, 'contact_id', 0));
@@ -257,14 +257,14 @@ function dfrn_confirm_post(App $a, $handsfree = null)
 
                        $xml = XML::parseString($res);
                        $status = (int) $xml->status;
-                       $message = Strings::unescape($xml->message);   // human readable text of what may have gone wrong.
+                       $message = XML::unescape($xml->message);   // human readable text of what may have gone wrong.
                        switch ($status) {
                                case 0:
                                        info(L10n::t("Confirmation completed successfully.") . EOL);
                                        break;
                                case 1:
                                        // birthday paradox - generate new dfrn-id and fall through.
-                                       $new_dfrn_id = random_string();
+                                       $new_dfrn_id = Strings::getRandomHex();
                                        q("UPDATE contact SET `issued-id` = '%s' WHERE `id` = %d AND `uid` = %d",
                                                DBA::escape($new_dfrn_id),
                                                intval($contact_id),