Merge pull request #15328 from edx/schen/learner-1464

Revert "fix valid signature" from OSPR-1539
This commit is contained in:
Simon Chen
2017-06-15 08:29:58 -04:00
committed by GitHub
2 changed files with 2 additions and 6 deletions

View File

@@ -887,10 +887,8 @@ 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_for_signature, access_key, secret_key
"POST", headers, body, access_key, secret_key
)
headers['Authorization'] = authorization

View File

@@ -1104,15 +1104,13 @@ 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_for_signature,
body_dict,
settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["API_ACCESS_KEY"],
settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["API_SECRET_KEY"]
)