mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
Polish modules/jwtx: key file open mode
There is no reason why we should open a key file being written read/write, use O_WRONLY
This commit is contained in:
parent
20c1f699bd
commit
ecae2459c7
1 changed files with 1 additions and 1 deletions
|
|
@ -338,7 +338,7 @@ func loadOrCreateAsymmetricKey(keyPath, algorithm string) (any, error) {
|
|||
return err
|
||||
}
|
||||
|
||||
f, err := os.OpenFile(keyPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o600)
|
||||
f, err := os.OpenFile(keyPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue