From ce37466ee16c39bf19832524793a23d40915de93 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Wed, 14 Apr 2021 23:15:09 +0200 Subject: [PATCH] Fix randomness bug when sending multiple challenges --- client/src/views/Hall.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 98c52c5d..c3c81282 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -1096,7 +1096,7 @@ export default { return; } window.V = this.newchallenge.V; - let chall = Object.assign({ options: {} }, this.newchallenge); + let chall = Object.assign({}, this.newchallenge, { options: {} }); // Get/set options variables (if any) / TODO: v-model?! for (const check of this.newchallenge.V.Options.check || []) { const elt = document.getElementById(check.variable + "_opt"); @@ -1216,8 +1216,10 @@ export default { "POST", { data: { - chall: Object.assign({}, - chall, { options: JSON.stringify(chall.options) } + chall: Object.assign( + {}, + chall, + { options: JSON.stringify(chall.options) } ) }, success: (response) => { -- 2.44.0