com web/rmtools: need urlencode for passwords with 7.0.13 or 7.0.1: include/Tools.php
| From: | Anatol Belski | Date: | Thu, 08 Dec 2016 18:57:25 +0000 |
| Subject: | com web/rmtools: need urlencode for passwords with 7.0.13 or 7.0.1: include/Tools.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25911@lists.php.net to get a copy of this message | ||
Commit: 14da3f4d23e13d316682aa2a3eb61db08de1b34b
Author: Anatol Belski <ab@php.net> Thu, 8 Dec 2016 19:57:25 +0100
Parents: b72e92f27b2c6307e3843c7316f14bd2876a8f9b
Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=14da3f4d23e13d316682aa2a3eb61db08de1b34b
Log:
need urlencode for passwords with 7.0.13 or 7.0.1
Changed paths:
M include/Tools.php
Diff:
diff --git a/include/Tools.php b/include/Tools.php
index b53cf5a..bfce563 100644
--- a/include/Tools.php
+++ b/include/Tools.php
@@ -131,7 +131,7 @@ function upload_file_curl($src, $target) // SAZ - Like upload_file(), but using
$ftp_user = $user_snaps;
$ftp_password = $password;
- $remoteurl = "ftps://${ftp_user}:${ftp_password}@${ftp_server}/${target}";
+ $remoteurl = "ftps://" . urlencode($ftp_user) . ":" . urlencode($ftp_password)
. "@${ftp_server}/${target}";
$fp = fopen($src, "rb");
$ch = curl_init();
@@ -202,7 +202,7 @@ function upload_build_result_ftp_curl($src_dir, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
- $remoteurl =
"ftps://${ftp_user}:${ftp_password}@${ftp_server}${ftp_path}/${local_file}";
+ $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}${ftp_path}/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
@@ -221,7 +221,7 @@ function upload_build_result_ftp_curl($src_dir, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
- $remoteurl =
"ftps://${ftp_user}:${ftp_password}@${ftp_server}${ftp_path}/logs/${local_file}";
+ $remoteurl = "ftps://" . urlencode(ftp_user) . ":" . urlencode($ftp_password)
. "@${ftp_server}${ftp_path}/logs/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
@@ -411,7 +411,7 @@ function upload_pecl_pkg_ftp_curl($files, $logs, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
- $remoteurl =
"ftps://${ftp_user}:${ftp_password}@${ftp_server}${ftp_path}/${local_file}";
+ $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}${ftp_path}/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
@@ -430,7 +430,7 @@ function upload_pecl_pkg_ftp_curl($files, $logs, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
- $remoteurl =
"ftps://${ftp_user}:${ftp_password}@${ftp_server}${ftp_path}/logs/${local_file}";
+ $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}${ftp_path}/logs/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
@@ -511,7 +511,7 @@ function upload_pickle_pkg_ftp_curl($files, $logs, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
- $remoteurl =
"ftps://${ftp_user}:${ftp_password}@${ftp_server}${ftp_path}/${local_file}";
+ $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}${ftp_path}/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
@@ -530,7 +530,7 @@ function upload_pickle_pkg_ftp_curl($files, $logs, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
- $remoteurl =
"ftps://${ftp_user}:${ftp_password}@${ftp_server}${ftp_path}/logs/${local_file}";
+ $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}${ftp_path}/logs/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);