mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-20 15:37:30 -06:00
use io.ReadFull
This commit is contained in:
parent
d84d73c050
commit
c5046b59ef
1 changed files with 1 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ func (p *Processor) TwoFactorQRCodeURIGet(
|
|||
// We do! Read some random crap.
|
||||
// 32 bytes should be plenty entropy.
|
||||
secret := make([]byte, 32)
|
||||
if _, err := rand.Read(secret); err != nil {
|
||||
if _, err := io.ReadFull(rand.Reader, secret); err != nil {
|
||||
err := gtserror.Newf("error generating new secret: %w", err)
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue