Browse Source

Fix paths with url-encoded @ to redirect to the correct path (#23593)

closed-social-glitch-2
Thijs Kinkhorst 1 year ago
committed by GitHub
parent
commit
d15a9df6fe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      config/routes.rb

+ 2
- 0
config/routes.rb View File

@ -110,6 +110,8 @@ Rails.application.routes.draw do
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

Loading…
Cancel
Save