Update rng package import

This commit is contained in:
Daniel 2019-09-24 15:38:51 +02:00
parent d0ffecb060
commit f7ccc58b98

View file

@ -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)