diff options
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/helm_packages.rb | 2 | ||||
-rw-r--r-- | lib/api/helpers.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/helm_packages.rb b/lib/api/helm_packages.rb index 8260d8a88f8..c811f47cb5b 100644 --- a/lib/api/helm_packages.rb +++ b/lib/api/helm_packages.rb @@ -75,6 +75,8 @@ module API requires :file_name, type: String, desc: 'Helm package file name', documentation: { example: 'mychart' } end get ":channel/charts/:file_name.tgz" do + not_found!("Format #{params[:format]}") unless params[:format].nil? + project = authorized_user_project(action: :read_package) authorize_read_package!(project) diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index dbeacda01ea..a7e0a551283 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -897,7 +897,7 @@ module API def project_moved?(id, project) return false unless Feature.enabled?(:api_redirect_moved_projects) return false unless id.is_a?(String) && id.include?('/') - return false if project.blank? || id == project.full_path + return false if project.blank? || project.full_path.casecmp?(id) return false unless params[:id] == id true |