2010-03-03 16:27:20 +03:00
|
|
|
--- simplepie.inc.o 2010-03-03 16:25:08.982938422 +0300
|
|
|
|
+++ simplepie.inc 2010-03-03 16:26:19.678998009 +0300
|
|
|
|
@@ -43,6 +43,10 @@
|
|
|
|
* @todo phpDoc comments
|
|
|
|
*/
|
|
|
|
|
|
|
|
+/* added by FoF (vitalif@yourcmc.ru) to enable environment proxy settings support */
|
|
|
|
+/* fucking cURL doesn't support this by default */
|
2010-03-03 16:34:36 +03:00
|
|
|
+require_once(dirname(dirname(__FILE__)).'/curl-env-proxy.php');
|
2010-03-03 16:27:20 +03:00
|
|
|
+
|
|
|
|
/**
|
|
|
|
* SimplePie Name
|
|
|
|
*/
|
|
|
|
@@ -446,7 +450,7 @@ class SimplePie
|
2009-08-05 21:01:27 +04:00
|
|
|
* @see SimplePie::set_timeout()
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
- var $timeout = 10;
|
|
|
|
+ var $timeout = 60;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var bool Forces fsockopen() to be used for remote files instead
|
2010-03-03 16:27:20 +03:00
|
|
|
@@ -708,7 +712,7 @@ class SimplePie
|
2009-10-26 16:16:15 +03:00
|
|
|
* @see SimplePie::strip_htmltags()
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
- var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style');
|
|
|
|
+ var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'font', 'form', 'frame', 'frameset', 'html', 'input', 'marquee', 'meta', 'noscript', 'script', 'style');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The SimplePie class contains feed level data and options
|
2010-03-03 16:27:20 +03:00
|
|
|
@@ -1662,6 +1666,12 @@ class SimplePie
|
2009-10-26 16:16:15 +03:00
|
|
|
$locate =& new $this->locator_class($file, $this->timeout, $this->useragent, $this->file_class, $this->max_checked_feeds, $this->content_type_sniffer_class);
|
|
|
|
if (!$locate->is_feed($file))
|
|
|
|
{
|
|
|
|
+ if ($file->status_code == 401)
|
|
|
|
+ {
|
|
|
|
+ $this->error = "HTTP 401 Unauthorized. Retry with correct login/password";
|
|
|
|
+ SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
// We need to unset this so that if SimplePie::set_file() has been called that object is untouched
|
|
|
|
unset($file);
|
|
|
|
if ($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds))
|
2010-03-03 16:27:20 +03:00
|
|
|
@@ -7676,6 +7686,13 @@ class SimplePie_File
|
2009-08-03 17:46:58 +04:00
|
|
|
{
|
|
|
|
curl_setopt($fp, CURLOPT_ENCODING, '');
|
|
|
|
}
|
2009-08-05 21:01:27 +04:00
|
|
|
+ if (preg_match('#^([a-z0-9_]+://)(?:([^/]*:[^/]*)@)([^/@]+([/\?].*)?$)#is', $url, $m))
|
|
|
|
+ {
|
|
|
|
+ $headers2[] = "Authorization: Basic ".base64_encode(urldecode($m[2]));
|
|
|
|
+ }
|
2010-03-03 16:27:20 +03:00
|
|
|
+ // added by FoF (vitalif@yourcmc.ru) to enable environment proxy settings support
|
|
|
|
+ // fucking cURL doesn't support this by default
|
|
|
|
+ curl_set_env_proxy($fp, $url);
|
2009-08-03 17:46:58 +04:00
|
|
|
curl_setopt($fp, CURLOPT_URL, $url);
|
|
|
|
curl_setopt($fp, CURLOPT_HEADER, 1);
|
|
|
|
curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1);
|
2010-03-03 16:27:20 +03:00
|
|
|
@@ -7690,6 +7707,10 @@ class SimplePie_File
|
2009-08-03 16:42:04 +04:00
|
|
|
curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects);
|
|
|
|
}
|
2009-08-03 17:46:58 +04:00
|
|
|
|
2009-08-03 16:42:04 +04:00
|
|
|
+ // added by FoF to enable https and digest authentication
|
|
|
|
+ curl_setopt($fp, CURLOPT_SSL_VERIFYPEER, false);
|
|
|
|
+ curl_setopt($fp, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
2009-08-03 17:46:58 +04:00
|
|
|
+
|
2009-08-03 16:42:04 +04:00
|
|
|
$this->headers = curl_exec($fp);
|
2009-08-03 17:46:58 +04:00
|
|
|
if (curl_errno($fp) === 23 || curl_errno($fp) === 61)
|
|
|
|
{
|
2010-03-03 16:27:20 +03:00
|
|
|
@@ -14654,7 +14675,7 @@ class SimplePie_Sanitize
|
2009-10-26 16:16:15 +03:00
|
|
|
// Options
|
|
|
|
var $remove_div = true;
|
|
|
|
var $image_handler = '';
|
|
|
|
- var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style');
|
|
|
|
+ var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'font', 'form', 'frame', 'frameset', 'html', 'input', 'marquee', 'meta', 'noscript', 'script', 'style');
|
|
|
|
var $encode_instead_of_strip = false;
|
|
|
|
var $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc');
|
|
|
|
var $strip_comments = false;
|
2010-03-03 16:27:20 +03:00
|
|
|
@@ -14743,7 +14764,7 @@ class SimplePie_Sanitize
|
2009-10-26 16:16:15 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- function strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'))
|
|
|
|
+ function strip_htmltags($tags = array('base', 'blink', 'body', 'doctype', 'font', 'form', 'frame', 'frameset', 'html', 'input', 'marquee', 'meta', 'noscript', 'script', 'style'))
|
|
|
|
{
|
|
|
|
if ($tags)
|
|
|
|
{
|