Skip to content

Commit 752a44f

Browse files
committed
Use appropriate base64 function
When constructing hash keys for extension autocomplete, make sure no newlines appear in the base64 text.
1 parent 3993651 commit 752a44f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/extensions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def index
1818
@usersEncoded = {}
1919
@course.course_user_data.each do |cud|
2020
@users[cud.full_name_with_email] = cud.id
21-
@usersEncoded[Base64.encode64(cud.full_name_with_email.strip).strip] = cud.id
21+
@usersEncoded[Base64.urlsafe_encode64(cud.full_name_with_email.strip).strip] = cud.id
2222
end
2323
@new_extension = @assessment.extensions.new
2424
end

0 commit comments

Comments
 (0)