prune_captcha 1.16.1__py3-none-any.whl → 1.18.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prune_captcha/static/prune_captcha/js/captcha.js +17 -3
- prune_captcha/utils.py +2 -2
- {prune_captcha-1.16.1.dist-info → prune_captcha-1.18.0.dist-info}/METADATA +3 -1
- prune_captcha-1.18.0.dist-info/RECORD +10 -0
- prune_captcha-1.16.1.dist-info/RECORD +0 -10
- {prune_captcha-1.16.1.dist-info → prune_captcha-1.18.0.dist-info}/WHEEL +0 -0
- {prune_captcha-1.16.1.dist-info → prune_captcha-1.18.0.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,25 @@
|
|
1
1
|
const puzzlePiece = document.querySelector(".puzzle-piece");
|
2
2
|
const puzzleContainer = document.querySelector(".puzzle-container");
|
3
|
+
|
4
|
+
const addHiddenInputs = () => {
|
5
|
+
const form = document.querySelector("form");
|
6
|
+
|
7
|
+
["pos_x_answer", "pos_y_answer"].forEach((name) => {
|
8
|
+
const input = document.createElement("input");
|
9
|
+
input.type = "text";
|
10
|
+
input.name = name;
|
11
|
+
input.placeholder = name
|
12
|
+
.replace(/_/g, " ")
|
13
|
+
.replace(/\b\w/g, (c) => c.toUpperCase());
|
14
|
+
input.style.display = "none";
|
15
|
+
form.appendChild(input);
|
16
|
+
});
|
17
|
+
};
|
18
|
+
addHiddenInputs();
|
19
|
+
|
3
20
|
const inputPosX = document.querySelector('input[name="pos_x_answer"]');
|
4
21
|
const inputPosY = document.querySelector('input[name="pos_y_answer"]');
|
5
22
|
|
6
|
-
inputPosX.parentElement.style.display = "none";
|
7
|
-
inputPosY.parentElement.style.display = "none";
|
8
|
-
|
9
23
|
let isDragging = false;
|
10
24
|
let offsetX = 0;
|
11
25
|
let offsetY = 0;
|
prune_captcha/utils.py
CHANGED
@@ -36,8 +36,8 @@ def create_and_get_captcha(
|
|
36
36
|
|
37
37
|
|
38
38
|
def verify_captcha(request: HttpRequest) -> bool:
|
39
|
-
pos_x_answer = request.POST.get("pos_x_answer")
|
40
|
-
pos_y_answer = request.POST.get("
|
39
|
+
pos_x_answer = int(request.POST.get("pos_x_answer"))
|
40
|
+
pos_y_answer = int(request.POST.get("pos_y_answer"))
|
41
41
|
if pos_x_answer is None or pos_y_answer is None:
|
42
42
|
return False
|
43
43
|
pos_x_solution = request.session.get("pos_x_solution")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: prune_captcha
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.18.0
|
4
4
|
Summary: A tool to protect formulaire from spam.
|
5
5
|
Author-email: Arnout <bastien@prune.sh>
|
6
6
|
Project-URL: Made_by, https://prune.sh/
|
@@ -116,6 +116,8 @@ Important: You must import the static files (css, js) present in "prune_captcha/
|
|
116
116
|
|
117
117
|
| Version | Date | Notes |
|
118
118
|
| ------- | ---------- | ---------------------------------- |
|
119
|
+
| 1.18.0 | 2025-05-22 | create "addHiddenInputs" func |
|
120
|
+
| 1.17.0 | 2025-05-21 | fix pos_answer |
|
119
121
|
| 1.16.1 | 2025-05-21 | fix static |
|
120
122
|
| 1.16.0 | 2025-05-21 | fix static |
|
121
123
|
| 1.15.2 | 2025-05-21 | fix manifest |
|
@@ -0,0 +1,10 @@
|
|
1
|
+
prune_captcha/__init__.py,sha256=289nX-nsT20GUbXE9Lm4Iv6H7b7XmJyLisg9Z2MRR0k,61
|
2
|
+
prune_captcha/apps.py,sha256=imbFju15itWdZA7vPg7IRD0QnDp8FFnrEQVpjha8G7M,422
|
3
|
+
prune_captcha/utils.py,sha256=wbvjzUUHDha3FANx8Hh_Xyh4vQl2i_rxzobVxQh_T_8,1871
|
4
|
+
prune_captcha/static/prune_captcha/css/captcha.css,sha256=nMBmOXSDNKcEWqq_n-tHuN3KcK8_a1o2DQS_msZ72MA,398
|
5
|
+
prune_captcha/static/prune_captcha/js/captcha.js,sha256=tEGjT14Fn6fe0wt05dQxbCOr4-XpDE2f8qz2HC4plFc,2155
|
6
|
+
prune_captcha/templates/prune_captcha/captcha.html,sha256=-gmfIfvAw_1TIGdJmOaaZA7v3VaUGM814KuistjjFzU,996
|
7
|
+
prune_captcha-1.18.0.dist-info/METADATA,sha256=5tTSG19DYat3L4N5JCdVIutJitCkqgMlZnB1iZAMiwI,4203
|
8
|
+
prune_captcha-1.18.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
9
|
+
prune_captcha-1.18.0.dist-info/top_level.txt,sha256=v0fVjlwv7OWp7NHgpeR5Oj0xhlf81K24sP2r9DYw5Qg,14
|
10
|
+
prune_captcha-1.18.0.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
prune_captcha/__init__.py,sha256=289nX-nsT20GUbXE9Lm4Iv6H7b7XmJyLisg9Z2MRR0k,61
|
2
|
-
prune_captcha/apps.py,sha256=imbFju15itWdZA7vPg7IRD0QnDp8FFnrEQVpjha8G7M,422
|
3
|
-
prune_captcha/utils.py,sha256=0wgRNCfmAAugFh5sw3qk-YqvNMiMZgJRtd6QlpRa-D8,1861
|
4
|
-
prune_captcha/static/prune_captcha/css/captcha.css,sha256=nMBmOXSDNKcEWqq_n-tHuN3KcK8_a1o2DQS_msZ72MA,398
|
5
|
-
prune_captcha/static/prune_captcha/js/captcha.js,sha256=CzQMJmBNI5-folgrQ3Fa78u-ENr9EpZ2e4OenUzNSPE,1779
|
6
|
-
prune_captcha/templates/prune_captcha/captcha.html,sha256=-gmfIfvAw_1TIGdJmOaaZA7v3VaUGM814KuistjjFzU,996
|
7
|
-
prune_captcha-1.16.1.dist-info/METADATA,sha256=bs9KBWDH7WWaQ2_NeSmcp_OR0FwaUZpyKQ_PcY7gzq0,4079
|
8
|
-
prune_captcha-1.16.1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
9
|
-
prune_captcha-1.16.1.dist-info/top_level.txt,sha256=v0fVjlwv7OWp7NHgpeR5Oj0xhlf81K24sP2r9DYw5Qg,14
|
10
|
-
prune_captcha-1.16.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|