FIX: Check if selectable avatar with SHA1

FIX: Check if selectable avatar with SHA1

diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index f0ca878..59a02bd 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1138,7 +1138,7 @@ class UsersController < ApplicationController
       return render json: failed_json, status: 422
     end
 
-    unless SiteSetting.selectable_avatars[upload.url]
+    unless SiteSetting.selectable_avatars[upload.sha1]
       return render json: failed_json, status: 422
     end
 

GitHub sha: 25505978

1 Like