lol
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
import json
|
||||
from urllib import request as http
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from flask import current_app
|
||||
from flask import request
|
||||
from werkzeug.urls import url_encode
|
||||
from wtforms import ValidationError
|
||||
|
||||
RECAPTCHA_VERIFY_SERVER_DEFAULT = "https://www.google.com/recaptcha/api/siteverify"
|
||||
@@ -54,7 +54,7 @@ class Recaptcha:
|
||||
if not verify_server:
|
||||
verify_server = RECAPTCHA_VERIFY_SERVER_DEFAULT
|
||||
|
||||
data = url_encode(
|
||||
data = urlencode(
|
||||
{"secret": private_key, "remoteip": remote_addr, "response": response}
|
||||
)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from flask import current_app
|
||||
from flask import Markup
|
||||
from werkzeug.urls import url_encode
|
||||
from markupsafe import Markup
|
||||
|
||||
RECAPTCHA_SCRIPT_DEFAULT = "https://www.google.com/recaptcha/api.js"
|
||||
RECAPTCHA_DIV_CLASS_DEFAULT = "g-recaptcha"
|
||||
@@ -22,10 +23,10 @@ class RecaptchaWidget:
|
||||
if not script:
|
||||
script = RECAPTCHA_SCRIPT_DEFAULT
|
||||
if params:
|
||||
script += "?" + url_encode(params)
|
||||
script += "?" + urlencode(params)
|
||||
attrs = current_app.config.get("RECAPTCHA_DATA_ATTRS", {})
|
||||
attrs["sitekey"] = public_key
|
||||
snippet = " ".join(f'data-{k}="{attrs[k]}"' for k in attrs) # noqa: B028
|
||||
snippet = " ".join(f'data-{k}="{attrs[k]}"' for k in attrs) # noqa: B028, B907
|
||||
div_class = current_app.config.get("RECAPTCHA_DIV_CLASS")
|
||||
if not div_class:
|
||||
div_class = RECAPTCHA_DIV_CLASS_DEFAULT
|
||||
|
||||
Reference in New Issue
Block a user