DEV: validate param value on /embed/topics

DEV: validate param value on /embed/topics

diff --git a/app/controllers/embed_controller.rb b/app/controllers/embed_controller.rb
index 49be221..c4bde73 100644
--- a/app/controllers/embed_controller.rb
+++ b/app/controllers/embed_controller.rb
@@ -36,8 +36,8 @@ class EmbedController < ApplicationController
       raise Discourse::InvalidParameters.new(:embed_id) unless @embed_id =~ /^de\-[a-zA-Z0-9]+$/
     end
 
-    if params.has_key?(:template)
-      @template = params[:template]
+    if params.has_key?(:template) && params[:template] == "complete"
+      @template = "complete"
     else
       @template = "basic"
     end

GitHub sha: 3e37801d

1 Like