thinger-io / thinger-server

Thinger.io Server Repository
MIT License
3 stars 0 forks source link

Can't remove nodes form Node-RED that have a scope #53

Closed bautisflow closed 11 months ago

bautisflow commented 1 year ago

Describe the bug When removing packages from node red that have a scope, starting with @, it seems that thinger server is receiving the character as is, but when sending the request to the Node-RED plugin the server is encoding this character causing Node-RED to not be able to find the package and returning a 404.

To Reproduce Steps to reproduce the behavior:

  1. Go to Node-RED plugin
  2. Click on Options->Manage Palette
  3. Install any dependency with scope (Ex. @flowforge/node-red-function-gpt)
  4. Try to remove/uninstall the dependency

Expected behavior Dependency should be removed from the palette

Additional context According to RFC 3986 section 2.2, the at sign (@) is a reserved character and its encoding makes the URI not equivalent, and I quote:

The purpose of reserved characters is to provide a set of delimiting characters that are distinguishable from other data within a URI. URIs that differ in the replacement of a reserved character with its corresponding percent-encoded octet are not equivalent. Percent- encoding a reserved character, or decoding a percent-encoded octet that corresponds to a reserved character, will change how the URI is interpreted by most applications. Thus, characters in the reserved set are protected from normalization and are therefore safe to be used by scheme-specific and producer-specific algorithms for delimiting data subcomponents within a URI.

npm scopes

alvarolb commented 11 months ago

Fixed on the upcoming 5.4.0 version