Commit 33d8d9b 1 parent cbb0212 commit 33d8d9b Copy full SHA for 33d8d9b
File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -193,12 +193,11 @@ def hash_file(filename):
193
193
print ("File not found when creating a hash: " + filename )
194
194
return ""
195
195
196
- md5Hash = hashlib .new ("md5" , usedforsecurity = False )
197
- md5Hash .update (content )
198
- md5Hashed = md5Hash .hexdigest ()
196
+ sha1Hash = hashlib .sha1 (content )
197
+ sha1Hashed = sha1Hash .hexdigest ()
199
198
200
199
# return the hex representation of digest
201
- return md5Hashed
200
+ return sha1Hashed
202
201
203
202
204
203
# Takes the URI and appends a param containing the current git hash
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ def test_cacheBust_no_params():
86
86
assert input_uri == sections [0 ]
87
87
88
88
hash = sections [1 ].split ("=" )[1 ]
89
- assert len (hash ) == 32
89
+ assert len (hash ) == 40
90
90
91
91
92
92
def test_cacheBust_params ():
@@ -99,7 +99,7 @@ def test_cacheBust_params():
99
99
assert params [0 ] == "fakeParam=myFakeParam"
100
100
101
101
hash = params [1 ].split ("=" )[1 ]
102
- assert len (hash ) == 32
102
+ assert len (hash ) == 40
103
103
104
104
105
105
def test_append_uri_param ():
@@ -120,7 +120,7 @@ def test_append_uri_param():
120
120
def test_hash_file ():
121
121
result = hash_file ("static/javascripts/MapController.js" )
122
122
print (result )
123
- assert len (result ) == 32
123
+ assert len (result ) == 40
124
124
125
125
126
126
def test_make_url_param_str_all_arguements ():
You can’t perform that action at this time.
0 commit comments