DEV: validate param value on /embed/topics

This commit is contained in:
Arpit Jalan 2019-09-04 13:31:46 +05:30
parent ed00f35306
commit 3e37801d05
1 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,8 @@ class EmbedController < ApplicationController
raise Discourse::InvalidParameters.new(:embed_id) unless @embed_id =~ /^de\-[a-zA-Z0-9]+$/ raise Discourse::InvalidParameters.new(:embed_id) unless @embed_id =~ /^de\-[a-zA-Z0-9]+$/
end end
if params.has_key?(:template) if params.has_key?(:template) && params[:template] == "complete"
@template = params[:template] @template = "complete"
else else
@template = "basic" @template = "basic"
end end