aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-01 16:15:37 -0700
committerFriendika <info@friendika.com>2011-08-01 16:15:37 -0700
commite76990ae7bffdcc5f1c54146f54fc11729c537b7 (patch)
tree73c47b6b23052a6010b9a5fd55535e973cda32f7
parent326a873082cd9f31f70bfb703ad2c3e7fde19bb8 (diff)
downloadvolse-hubzilla-e76990ae7bffdcc5f1c54146f54fc11729c537b7.tar.gz
volse-hubzilla-e76990ae7bffdcc5f1c54146f54fc11729c537b7.tar.bz2
volse-hubzilla-e76990ae7bffdcc5f1c54146f54fc11729c537b7.zip
bug #111 - don't parse an @ address as a feed
-rw-r--r--boot.php8
-rw-r--r--include/Scrape.php4
2 files changed, 8 insertions, 4 deletions
diff --git a/boot.php b/boot.php
index 4d4b38512..113f5d72c 100644
--- a/boot.php
+++ b/boot.php
@@ -1,6 +1,6 @@
<?php
-define ( 'FRIENDIKA_VERSION', '2.2.1058' );
+define ( 'FRIENDIKA_VERSION', '2.2.1059' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1076 );
@@ -1743,10 +1743,12 @@ function fetch_xrd_links($url) {
$xml = fetch_url($url);
- if (! $xml)
- return array();
logger('fetch_xrd_links: ' . $xml, LOGGER_DATA);
+
+ if ((! $xml) || (! stristr($xml,'<xrd')))
+ return array();
+
$h = parse_xml_string($xml);
if(! $h)
return array();
diff --git a/include/Scrape.php b/include/Scrape.php
index 6726d0b15..9bf89a49e 100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -294,6 +294,8 @@ function probe_url($url) {
$twitter = ((strpos($url,'twitter.com') !== false) ? true : false);
+ $at_addr = ((strpos($url,'@') !== false) ? true : false);
+
if(! $twitter) {
$links = lrdd($url);
@@ -452,7 +454,7 @@ function probe_url($url) {
$vcard['fn'] = $vcard['nick'];
- if(((! isset($vcard)) && (! $poll)) || ($twitter)) {
+ if(((! isset($vcard)) && (! $poll) && (! $at_addr)) || ($twitter)) {
$feedret = scrape_feed($url);
logger('probe_url: scrape_feed returns: ' . print_r($feedret,true), LOGGER_DATA);