Skip to content

Commit

Permalink
[13.x] Validate key files' permissions (#1789)
Browse files Browse the repository at this point in the history
* validate key permissions

* oauth2-server handles Windows
  • Loading branch information
hafezdivandari authored Feb 17, 2025
1 parent 041a795 commit b907586
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Passport.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Passport
/**
* Indicates if Passport should validate the permissions of its encryption keys.
*/
public static bool $validateKeyPermissions = false;
public static bool $validateKeyPermissions = true;

/**
* Indicates if the refresh token should be revoked after use.
Expand Down
2 changes: 1 addition & 1 deletion src/PassportServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ protected function makeCryptKey(string $type): CryptKey
$key = 'file://'.Passport::keyPath('oauth-'.$type.'.key');
}

return new CryptKey($key, null, Passport::$validateKeyPermissions && ! windows_os());
return new CryptKey($key, null, Passport::$validateKeyPermissions);
}

/**
Expand Down

0 comments on commit b907586

Please sign in to comment.