Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
8b2742d8
Commit
8b2742d8
authored
Aug 09, 2023
by
Emmy Vouriot
Committed by
Jérome Perrin
Feb 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove int cast from bytes with ord()
parent
4a28c257
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
product/ERP5Form/CaptchasDotNet.py
product/ERP5Form/CaptchasDotNet.py
+3
-1
No files found.
product/ERP5Form/CaptchasDotNet.py
View file @
8b2742d8
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
from
hashlib
import
md5
from
hashlib
import
md5
import
random
import
random
from
Products.ERP5Type.Utils
import
str2bytes
from
Products.ERP5Type.Utils
import
str2bytes
import
six
class
CaptchasDotNet
:
class
CaptchasDotNet
:
def
__init__
(
self
,
client
,
secret
,
def
__init__
(
self
,
client
,
secret
,
...
@@ -136,7 +137,8 @@ class CaptchasDotNet:
...
@@ -136,7 +137,8 @@ class CaptchasDotNet:
# Compute password
# Compute password
correct_password
=
''
correct_password
=
''
for
pos
in
range
(
password_length
):
for
pos
in
range
(
password_length
):
letter_num
=
ord
(
digest
[
pos
])
%
len
(
password_alphabet
)
digest_char
=
ord
(
digest
[
pos
])
if
six
.
PY2
else
digest
[
pos
]
letter_num
=
digest_char
%
len
(
password_alphabet
)
correct_password
+=
password_alphabet
[
letter_num
]
correct_password
+=
password_alphabet
[
letter_num
]
return
correct_password
return
correct_password
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment