mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
SECURITY: limit route access when using external avatars
This commit is contained in:
parent
437ad5b05a
commit
cb3afd11b4
2 changed files with 17 additions and 1 deletions
|
@ -21,8 +21,11 @@ class UserAvatarsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# mainly used in development for backwards compat
|
||||
def show_proxy_letter
|
||||
if SiteSetting.external_system_avatars_url !~ /^\/letter_avatar_proxy/
|
||||
raise Discourse::NotFound
|
||||
end
|
||||
|
||||
params.require(:letter)
|
||||
params.require(:color)
|
||||
params.require(:version)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue