Skip to content

Commit 1e3b854

Browse files
authored
Merge pull request #3 from jpcaparas/hotfix/absolute-path
(HOTFIX) Use absolute path instead of prefixing it with getcwd
2 parents 2586b72 + e48607b commit 1e3b854

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Box/Auth/AppAuth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ public function authenticate(JWTClaim $claim)
6161
$this->claim = $claim;
6262

6363
// $key Has to be the key file handler opened using openssl method
64-
$key = openssl_get_privatekey("file://" . getcwd() . '/' . $this->private_key, $this->pass_phrase);
64+
$key = openssl_get_privatekey("file://" . $this->private_key, $this->pass_phrase);
6565

6666
if ($key === false) {
6767
// TODO: Move to separate exception
68-
throw new \Exception('Could not read key from "' . "file://" . getcwd() . '/' . $this->private_key . '" with pass phrase "' . $this->pass_phrase . '"');
68+
throw new \Exception('Could not read key from "' . "file://" . $this->private_key . '" with pass phrase "' . $this->pass_phrase . '"');
6969
}
7070

7171
$token = $claim->toArray();

0 commit comments

Comments
 (0)