Skip to content

Commit 7de63b8

Browse files
committed
[BUGFIX] Apply additional encoding on the encrypted password for transport safety
1 parent e1dd829 commit 7de63b8

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Classes/Authenticator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ public function authUser(array $user)
9797
}
9898

9999
// prevent error output which would show the plain text password
100-
if (true === @openssl_public_encrypt($this->login['uident_text'], $encrypted, $pubKeyArray['pubKey'])) {
101-
$encodedPassword = base64_encode($encrypted);
100+
$publicKey = base64_decode($pubKeyArray['pubKey']);
101+
if (true === @openssl_public_encrypt($this->login['uident_text'], $encrypted, $publicKey)) {
102+
$encodedPassword = urlencode(base64_encode($encrypted));
102103

103104
try {
104105
if ($this->client->authUser($user['username'], $encodedPassword, $pubKeyArray['encryptionId'])) {

ext_emconf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'author' => 'Oliver Eglseder',
1111
'author_email' => 'php@vxvr.de',
1212
'author_company' => 'in2code GmbH',
13-
'version' => '1.0.0',
13+
'version' => '1.0.1',
1414
'constraints' => [
1515
'depends' => [],
1616
'conflicts' => [],

0 commit comments

Comments
 (0)