Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit 87f1e4dd authored by Stephane Glondu's avatar Stephane Glondu
Browse files

In Election, move prng to inside MakeSimpleMonad functor

In Javascript, the call to random_string to initialize the prng may
fail. If this call is made at toplevel and fails, all dependending
random generations will fail. It was happening with trustee key
generation.
parent 2965e0b2
......@@ -40,8 +40,6 @@ let check_election_public_key (type t) g e =
(** Simple monad *)
let prng = lazy (pseudo_rng (random_string secure_rng 16))
module MakeSimpleMonad (G : GROUP) = struct
type 'a t = unit -> 'a
let ballots = ref []
......@@ -49,6 +47,8 @@ module MakeSimpleMonad (G : GROUP) = struct
let bind x f = f (x ())
let fail e = raise e
let prng = lazy (pseudo_rng (random_string secure_rng 16))
let random q =
let size = Z.bit_length q / 8 + 1 in
fun () ->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment