From af0b99e45ee812ec236d849937e18b885b32ce5e Mon Sep 17 00:00:00 2001 From: Gurkengewuerz Date: Tue, 22 Oct 2024 16:19:29 +0200 Subject: [PATCH] fix: recaptcha v3 --- layouts/shortcodes/form.html | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/layouts/shortcodes/form.html b/layouts/shortcodes/form.html index d7c2d72..94a0045 100644 --- a/layouts/shortcodes/form.html +++ b/layouts/shortcodes/form.html @@ -9,7 +9,10 @@ {{ end }} {{ end }} -
+{{ $seed := now.Unix }} +{{ $random := delimit (shuffle (split (md5 $seed) "" )) "" }} + + {{ $fieldCount := 0 }} {{ range $key, $value := .Params }} {{ if hasPrefix $key "field" }} @@ -58,14 +61,24 @@ {{ end }} - - {{ with .Get "recaptcha_site_key" }} -
- {{ end }} - +
-
-
\ No newline at end of file + + + \ No newline at end of file