]> git.wh0rd.org Git - tt-rss.git/commitdiff
urlencode login/pass before passing them to Magpie (closes #153)
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 17 Sep 2007 03:18:28 +0000 (04:18 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 17 Sep 2007 03:18:28 +0000 (04:18 +0100)
functions.php
magpierss/extlib/Snoopy.class.inc

index 362f965a42125d450f742c306af8bdb7ab841377..66fda3936e621de0c20d6e249c4944ba9cadce1f 100644 (file)
                        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"));
index 83a1e7395aa81c75f150ad4ea803011a802179c2..17e6a952d686fd7ef38dd425af49ade067a345be 100644 (file)
@@ -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"];