Skip to content

Commit

Permalink
Fix paths with url-encoded @ to redirect to the correct path (#23593)
Browse files Browse the repository at this point in the history
  • Loading branch information
thijskh authored and ClearlyClaire committed Mar 13, 2023
1 parent 3f2e318 commit 40ae8d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/routes.rb
Expand Up @@ -110,6 +110,8 @@

resource :inbox, only: [:create], module: :activitypub

get '/:encoded_at(*path)', to: redirect("/@%{path}"), constraints: { encoded_at: /%40/ }

constraints(username: /[^@\/.]+/) do
get '/@:username', to: 'accounts#show', as: :short_account
get '/@:username/with_replies', to: 'accounts#show', as: :short_account_with_replies
Expand Down

0 comments on commit 40ae8d5

Please sign in to comment.