node-solid-server icon indicating copy to clipboard operation
node-solid-server copied to clipboard

URI encoding for Windows OS

Open bourgeoa opened this issue 5 years ago • 1 comments

@timbl @angelo-v The following PR in 2017 rejects the use of : | / in POST. I suppose it was to preserve the possibility to use NSS on windows. https://github.com/solid/node-solid-server/commit/5bba6c931fe0b319b6b350b8338b6e144b0b67fa#diff-98a11be785b8100aab3a553eed0e3656a235f06463d2979fd08bafcdf503abdf

      slug = decodeURIComponent(slug)
      if (slug.match(/\/|\||:/)) {
        throw error(400, 'The name of new file POSTed may not contain : | or /')
      }

Using longChat in chat With Me encounters some problem because this control is not applied on PUT, when creating intermediate folders. see https://github.com/solid/chat-pane/issues/51

I suppose we need some coherence, what is your position :

  1. remove the control in POST
  2. add the control in all write functions including PUT PATCH (filename and intermediate containers)

bourgeoa avatar Dec 13 '20 15:12 bourgeoa

@bourgeoa - If this is retained for POST and/or added for PUT and/or PATCH, I suggest changing the 400 Bad Request code to 409 Conflict, and rewording the error text to --

'The name of a new file may not contain colon (:), pipe (|), or solidus (/) characters.'

TallTed avatar Dec 14 '20 20:12 TallTed