Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
re6stnet
Commits
597f4dea
Commit
597f4dea
authored
May 16, 2024
by
Tom Niget
Committed by
Tom Niget
Jun 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug: fix wrong sending of HMAC header causing test failure
parent
64d10c7f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
re6st/registry.py
re6st/registry.py
+2
-1
No files found.
re6st/registry.py
View file @
597f4dea
...
@@ -328,7 +328,7 @@ class RegistryServer:
...
@@ -328,7 +328,7 @@ class RegistryServer:
request
.
send_response
(
http
.
client
.
NO_CONTENT
)
request
.
send_response
(
http
.
client
.
NO_CONTENT
)
if
key
:
if
key
:
request
.
send_header
(
HMAC_HEADER
,
base64
.
b64encode
(
request
.
send_header
(
HMAC_HEADER
,
base64
.
b64encode
(
hmac
.
HMAC
(
key
,
result
,
hashlib
.
sha1
).
digest
()))
hmac
.
HMAC
(
key
,
result
,
hashlib
.
sha1
).
digest
())
.
decode
(
"ascii"
)
)
request
.
end_headers
()
request
.
end_headers
()
if
result
:
if
result
:
request
.
wfile
.
write
(
result
)
request
.
wfile
.
write
(
result
)
...
@@ -849,6 +849,7 @@ class RegistryClient:
...
@@ -849,6 +849,7 @@ class RegistryClient:
self
.
_conn
.
endheaders
()
self
.
_conn
.
endheaders
()
response
=
self
.
_conn
.
getresponse
()
response
=
self
.
_conn
.
getresponse
()
body
=
response
.
read
()
body
=
response
.
read
()
#print(query, repr(body))
if
response
.
status
in
(
http
.
client
.
OK
,
http
.
client
.
NO_CONTENT
):
if
response
.
status
in
(
http
.
client
.
OK
,
http
.
client
.
NO_CONTENT
):
if
(
not
client_prefix
or
if
(
not
client_prefix
or
hmac
.
HMAC
(
key
,
body
,
hashlib
.
sha1
).
digest
()
==
hmac
.
HMAC
(
key
,
body
,
hashlib
.
sha1
).
digest
()
==
...
...
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