Commit 4ce1222e by Simon Chen

Revert "fix valid signature"

This reverts commit e58e295c.

This is to fix learner-1464
parent c21b3c8f
...@@ -887,10 +887,8 @@ class SoftwareSecurePhotoVerification(PhotoVerification): ...@@ -887,10 +887,8 @@ class SoftwareSecurePhotoVerification(PhotoVerification):
"Content-Type": "application/json", "Content-Type": "application/json",
"Date": formatdate(timeval=None, localtime=False, usegmt=True) "Date": formatdate(timeval=None, localtime=False, usegmt=True)
} }
body_for_signature = {"EdX-ID": str(self.receipt_id)}
_message, _sig, authorization = generate_signed_message( _message, _sig, authorization = generate_signed_message(
"POST", headers, body_for_signature, access_key, secret_key "POST", headers, body, access_key, secret_key
) )
headers['Authorization'] = authorization headers['Authorization'] = authorization
......
...@@ -1104,15 +1104,13 @@ def results_callback(request): ...@@ -1104,15 +1104,13 @@ def results_callback(request):
headers = { headers = {
"Authorization": request.META.get("HTTP_AUTHORIZATION", ""), "Authorization": request.META.get("HTTP_AUTHORIZATION", ""),
"Content-Type": "application/json",
"Date": request.META.get("HTTP_DATE", "") "Date": request.META.get("HTTP_DATE", "")
} }
body_for_signature = {"EdX-ID": body_dict.get("EdX-ID")}
has_valid_signature( has_valid_signature(
"POST", "POST",
headers, headers,
body_for_signature, body_dict,
settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["API_ACCESS_KEY"], settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["API_ACCESS_KEY"],
settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["API_SECRET_KEY"] settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["API_SECRET_KEY"]
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment