Skip to content

Commit cd7fbb6

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

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
@@ -109,8 +109,9 @@ public function validateConnectionString($string)
109109
}
110110

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

115116
return $data;
116117
}

0 commit comments

Comments
 (0)