mirror of
https://github.com/safing/portbase
synced 2025-09-01 18:19:57 +00:00
Update rng package import
This commit is contained in:
parent
d0ffecb060
commit
f7ccc58b98
1 changed files with 2 additions and 2 deletions
|
@ -6,8 +6,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/safing/portbase/crypto/random"
|
||||
"github.com/safing/portbase/log"
|
||||
"github.com/safing/portbase/rng"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -91,7 +91,7 @@ func authMiddleware(next http.Handler) http.Handler {
|
|||
}
|
||||
|
||||
// write new cookie
|
||||
token, err := random.Bytes(32) // 256 bit
|
||||
token, err := rng.Bytes(32) // 256 bit
|
||||
if err != nil {
|
||||
log.Warningf("api: failed to generate random token: %s", err)
|
||||
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
|
||||
|
|
Loading…
Add table
Reference in a new issue