1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00

chore: encode parts of URL (#4922)

This commit is contained in:
Marc Bernard 2024-11-02 05:31:21 -04:00 committed by GitHub
parent fa22fa340d
commit e3c55f008c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

@ -0,0 +1,5 @@
---
'verdaccio': patch
---
chore: encode parts of URL

@ -216,7 +216,7 @@ export class ServerQuery {
*/
public removePackage(name: string, rev) {
return this.request({
uri: `/${encodeURIComponent(name)}/-rev/${rev}`,
uri: `/${encodeURIComponent(name)}/-rev/${encodeURIComponent(rev)}`,
method: 'DELETE',
headers: {
[HEADERS.CONTENT_TYPE]: HEADERS.JSON_CHARSET,
@ -226,7 +226,7 @@ export class ServerQuery {
public removeSingleTarball(name: string, filename: string) {
return this.request({
uri: `/${encodeURIComponent(name)}/-/${filename}/-rev/whatever`,
uri: `/${encodeURIComponent(name)}/-/${encodeURIComponent(filename)}/-rev/whatever`,
method: 'DELETE',
headers: {
[HEADERS.CONTENT_TYPE]: HEADERS.JSON_CHARSET,