From 4ce1222e998abc8d6d4664ad78f4653af6ce5934 Mon Sep 17 00:00:00 2001
From: Simon Chen <schen@edx.org>
Date: Wed, 14 Jun 2017 16:46:54 -0400
Subject: [PATCH] Revert "fix valid signature"

This reverts commit e58e295ca01b983d6008043ab4faf43486520523.

This is to fix learner-1464
---
 lms/djangoapps/verify_student/models.py | 4 +---
 lms/djangoapps/verify_student/views.py  | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py
index 57557d6d465..beb8b6848e2 100644
--- a/lms/djangoapps/verify_student/models.py
+++ b/lms/djangoapps/verify_student/models.py
@@ -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
 
diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py
index 38dafa92685..2c900bd25e7 100644
--- a/lms/djangoapps/verify_student/views.py
+++ b/lms/djangoapps/verify_student/views.py
@@ -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"]
     )
-- 
GitLab