urlencode login/pass before passing them to Magpie (closes )

This commit is contained in:
Andrew Dolgov 2007-09-17 04:18:28 +01:00
parent a5372e09c3
commit dcffb2723a
2 changed files with 4 additions and 4 deletions

View File

@ -442,8 +442,8 @@
return; return;
} }
$auth_login = db_fetch_result($result, 0, "auth_login"); $auth_login = urlencode(db_fetch_result($result, 0, "auth_login"));
$auth_pass = db_fetch_result($result, 0, "auth_pass"); $auth_pass = urlencode(db_fetch_result($result, 0, "auth_pass"));
$update_interval = db_fetch_result($result, 0, "update_interval"); $update_interval = db_fetch_result($result, 0, "update_interval");
$cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images")); $cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));

View File

@ -157,9 +157,9 @@ class Snoopy
//preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS); //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
$URI_PARTS = parse_url($URI); $URI_PARTS = parse_url($URI);
if (!empty($URI_PARTS["user"])) if (!empty($URI_PARTS["user"]))
$this->user = $URI_PARTS["user"]; $this->user = urldecode($URI_PARTS["user"]);
if (!empty($URI_PARTS["pass"])) if (!empty($URI_PARTS["pass"]))
$this->pass = $URI_PARTS["pass"]; $this->pass = urldecode($URI_PARTS["pass"]);
$this->_scheme = $URI_PARTS["scheme"]; $this->_scheme = $URI_PARTS["scheme"];