Skip to content

Commit a1ebbee

Browse files
javierperezmmage2pratik
authored andcommitted
Fixed: urldecode user & pass from FTP connection string
recoding to pass travis coding standards
1 parent 7866d00 commit a1ebbee

File tree

1 file changed

+3
-2
lines changed
  • lib/internal/Magento/Framework/System

1 file changed

+3
-2
lines changed

lib/internal/Magento/Framework/System/Ftp.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ public function validateConnectionString($string)
107107
}
108108

109109
// Decode user & password strings from URL
110-
if ( array_key_exists('user', $data) ) $data['user'] = urldecode($data['user']);
111-
if ( array_key_exists('pass', $data) ) $data['pass'] = urldecode($data['pass']);
110+
foreach (array_intersect(array_keys($data), ['user','pass']) as $key) {
111+
$data[$key] = urldecode($data[$key]);
112+
}
112113

113114
return $data;
114115
}

0 commit comments

Comments
 (0)