From e100af16485fea0b1df801edc0c3afb013d098e4 Mon Sep 17 00:00:00 2001 From: Aaron Janssen <110543972+JanssenAaron@users.noreply.github.com> Date: Mon, 10 Feb 2025 14:15:50 -0600 Subject: [PATCH] Permissive constraints on owner segment for apps/show (#4133) Permissive constraints on owner segment for apps/show to allow for usernames with dots and so on. --- apps/dashboard/config/routes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/config/routes.rb b/apps/dashboard/config/routes.rb index 2c2eefc6f..9f97c5ed5 100644 --- a/apps/dashboard/config/routes.rb +++ b/apps/dashboard/config/routes.rb @@ -68,8 +68,8 @@ # analytics request appears in the access logs and google analytics get 'analytics/:type' => proc { [204, {}, ['']] }, :as => 'analytics' - get 'apps/show/:name(/:type(/:owner))' => 'apps#show', :as => 'app', :defaults => { type: 'sys' } - get 'apps/icon/:name(/:type(/:owner))' => 'apps#icon', :as => 'app_icon', :defaults => { type: 'sys' } + get 'apps/show/:name(/:type(/:owner))' => 'apps#show', :as => 'app', :defaults => { type: 'sys' }, :constraints => { owner: %r{[^/]+} } + get 'apps/icon/:name(/:type(/:owner))' => 'apps#icon', :as => 'app_icon', :defaults => { type: 'sys' }, :constraints => { owner: %r{[^/]+} } get 'apps/index' => 'apps#index' get 'apps/restart' => 'apps#restart' if Configuration.app_sharing_enabled?