authftp: support des mots de passe avec des caractères spéciaux

This commit is contained in:
Jephté Clain 2021-09-22 22:47:03 +04:00
parent dfdfd59eae
commit 28d42b00f3
1 changed files with 4 additions and 2 deletions

View File

@ -84,6 +84,7 @@ read_value -i "Entrez le chemin" path "$4" N
if [ -n "$lftp" ]; then
if [ -n "$noproxy" ]; then
export LFTP_PASSWORD="$password"
if [ -n "$sftp" ]; then
url="sftp://$host/$path"
hostkeyfailed_apropos "$login@$host"
@ -92,12 +93,13 @@ if [ -n "$lftp" ]; then
fi
exec lftp "${options[@]}" -e "\
set ssl:verify-certificate $verify_certificate
open -u $login,$password $url"
open -u $login --env-password $url"
else
export LFTP_PASSWORD="${password}@${my_password}"
url="ftp://$AUTHFTP_PROXY_HOST/$path"
exec lftp "${options[@]}" -e "\
set ssl:verify-certificate $verify_certificate
open -u ${login}@${my_login}@${host},${password}@${my_password} $url"
open -u ${login}@${my_login}@${host} --env-password $url"
fi
else
if [ -n "$noproxy" ]; then