about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-07-22 20:49:54 +0200
committerGitHub <noreply@github.com>2022-07-22 20:49:54 +0200
commit85d0e3474574d82fc653925560d2905cee43287e (patch)
tree20a7c49c820e8b5b7e2389408b6d8deb55fa1119 /app/controllers
parent0a61b000e3f10e9be3d8ae1cccf53caa3877a55a (diff)
parent1ceebf2710794dc35211a16ad3af7f834641a2ab (diff)
Merge pull request #1810 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/v1/tags_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/api/v1/tags_controller.rb b/app/controllers/api/v1/tags_controller.rb
index d45015ff5..9e5c53330 100644
--- a/app/controllers/api/v1/tags_controller.rb
+++ b/app/controllers/api/v1/tags_controller.rb
@@ -24,6 +24,7 @@ class Api::V1::TagsController < Api::BaseController
   private
 
   def set_or_create_tag
+    return not_found unless /\A(#{Tag::HASHTAG_NAME_RE})\z/.match?(params[:id])
     @tag = Tag.find_normalized(params[:id]) || Tag.new(name: Tag.normalize(params[:id]), display_name: params[:id])
   end
 end