From: Andrew Dolgov Date: Mon, 17 Sep 2007 03:18:28 +0000 (+0100) Subject: urlencode login/pass before passing them to Magpie (closes #153) X-Git-Tag: 1.2.15~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=dcffb2723ac2c80475c196e2f1b5e07affcdf78a;p=tt-rss.git urlencode login/pass before passing them to Magpie (closes #153) --- diff --git a/functions.php b/functions.php index 362f965a..66fda393 100644 --- a/functions.php +++ b/functions.php @@ -442,8 +442,8 @@ return; } - $auth_login = db_fetch_result($result, 0, "auth_login"); - $auth_pass = db_fetch_result($result, 0, "auth_pass"); + $auth_login = urlencode(db_fetch_result($result, 0, "auth_login")); + $auth_pass = urlencode(db_fetch_result($result, 0, "auth_pass")); $update_interval = db_fetch_result($result, 0, "update_interval"); $cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images")); diff --git a/magpierss/extlib/Snoopy.class.inc b/magpierss/extlib/Snoopy.class.inc index 83a1e739..17e6a952 100644 --- a/magpierss/extlib/Snoopy.class.inc +++ b/magpierss/extlib/Snoopy.class.inc @@ -157,9 +157,9 @@ class Snoopy //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS); $URI_PARTS = parse_url($URI); if (!empty($URI_PARTS["user"])) - $this->user = $URI_PARTS["user"]; + $this->user = urldecode($URI_PARTS["user"]); if (!empty($URI_PARTS["pass"])) - $this->pass = $URI_PARTS["pass"]; + $this->pass = urldecode($URI_PARTS["pass"]); $this->_scheme = $URI_PARTS["scheme"];