Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
211e8105
Commit
211e8105
authored
Mar 06, 2019
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix npm package install with a dot in the name
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
4ed167b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
ee/changelogs/unreleased/10248-npm-packages-with-a-dot-on-the-package-name-returns-403-when-trying-to-install.yml
...n-the-package-name-returns-403-when-trying-to-install.yml
+5
-0
ee/lib/api/npm_packages.rb
ee/lib/api/npm_packages.rb
+1
-1
ee/spec/requests/api/npm_packages_spec.rb
ee/spec/requests/api/npm_packages_spec.rb
+10
-0
No files found.
ee/changelogs/unreleased/10248-npm-packages-with-a-dot-on-the-package-name-returns-403-when-trying-to-install.yml
0 → 100644
View file @
211e8105
---
title
:
Fix npm package install with a dot in the name
merge_request
:
9900
author
:
type
:
fixed
ee/lib/api/npm_packages.rb
View file @
211e8105
...
...
@@ -32,7 +32,7 @@ module API
params
do
requires
:package_name
,
type:
String
,
desc:
'Package name'
end
get
'packages/npm/*package_name'
,
requirements:
NPM_ENDPOINT_REQUIREMENTS
do
get
'packages/npm/*package_name'
,
format:
false
,
requirements:
NPM_ENDPOINT_REQUIREMENTS
do
package_name
=
params
[
:package_name
]
# To avoid name collision we require project path and project package be the same.
...
...
ee/spec/requests/api/npm_packages_spec.rb
View file @
211e8105
...
...
@@ -35,6 +35,16 @@ describe API::NpmPackages do
expect_a_valid_package_response
end
context
'project path with a dot'
do
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
,
path:
'foo.bar'
)
}
it
'returns the package info'
do
get_package
(
package
)
expect_a_valid_package_response
end
end
end
context
'internal project'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment