Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e31590e5
Commit
e31590e5
authored
Jun 09, 2017
by
Simon Chen
Committed by
GitHub
Jun 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13850 from proversity-org/proversity/fix-valid-signature
Fix valid signature
parents
53cd05fb
e58e295c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
lms/djangoapps/verify_student/models.py
+3
-1
lms/djangoapps/verify_student/views.py
+3
-1
No files found.
lms/djangoapps/verify_student/models.py
View file @
e31590e5
...
...
@@ -885,8 +885,10 @@ class SoftwareSecurePhotoVerification(PhotoVerification):
"Content-Type"
:
"application/json"
,
"Date"
:
formatdate
(
timeval
=
None
,
localtime
=
False
,
usegmt
=
True
)
}
body_for_signature
=
{
"EdX-ID"
:
str
(
self
.
receipt_id
)}
_message
,
_sig
,
authorization
=
generate_signed_message
(
"POST"
,
headers
,
body
,
access_key
,
secret_key
"POST"
,
headers
,
body
_for_signature
,
access_key
,
secret_key
)
headers
[
'Authorization'
]
=
authorization
...
...
lms/djangoapps/verify_student/views.py
View file @
e31590e5
...
...
@@ -1109,13 +1109,15 @@ def results_callback(request):
headers
=
{
"Authorization"
:
request
.
META
.
get
(
"HTTP_AUTHORIZATION"
,
""
),
"Content-Type"
:
"application/json"
,
"Date"
:
request
.
META
.
get
(
"HTTP_DATE"
,
""
)
}
body_for_signature
=
{
"EdX-ID"
:
body_dict
.
get
(
"EdX-ID"
)}
has_valid_signature
(
"POST"
,
headers
,
body_
dict
,
body_
for_signature
,
settings
.
VERIFY_STUDENT
[
"SOFTWARE_SECURE"
][
"API_ACCESS_KEY"
],
settings
.
VERIFY_STUDENT
[
"SOFTWARE_SECURE"
][
"API_SECRET_KEY"
]
)
...
...
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