From 59fc223a85097c16f005bfdaf52f8efd542b72c4 Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Mon, 7 Oct 2019 16:58:06 +0200 Subject: [PATCH] factors/captcha(minor): load correct keys --- passbook/factors/captcha/factor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/passbook/factors/captcha/factor.py b/passbook/factors/captcha/factor.py index 9017bc674..b5f9df5fb 100644 --- a/passbook/factors/captcha/factor.py +++ b/passbook/factors/captcha/factor.py @@ -16,8 +16,7 @@ class CaptchaFactor(FormView, AuthenticationFactor): def get_form(self, form_class=None): form = CaptchaForm(**self.get_form_kwargs()) - # TODO: uuuhm - form.fields['captcha'].public_key = '6Lfi1w8TAAAAAELH-YiWp0OFItmMzvjGmw2xkvUN' - form.fields['captcha'].private_key = '6Lfi1w8TAAAAAMQI3f86tGMvd1QkcqqVQyBWI23D' + form.fields['captcha'].public_key = self.authenticator.current_factor.public_key + form.fields['captcha'].private_key = self.authenticator.current_factor.private_key form.fields['captcha'].widget.attrs["data-sitekey"] = form.fields['captcha'].public_key return form