DEV: validate param value on /embed/topics
This commit is contained in:
parent
ed00f35306
commit
3e37801d05
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue