remotestorage/spec

Restrict set of filenames allowed

Closed this issue · 1 comments

This is a continuation from the proposed changes in #113, see the discussion there and in #103. If I get around to it, I'll write another recap here.

I think I'm going to drop this proposal for now. I still think that forbidding unsafe characters would almost guarantee that most remoteStorage servers will be free of unicode bugs. And yet...

  • @michielbdejong and @skddc were concerned about backwards compatibility. I don't think that backwards compatibility has to be even remotely considered at this stage of the spec, but answered with:

    1. Next draft: it is recommended that clients don't use unsafe chars for PUT
    2. Next draft: servers MUST reject PUT with unsafe chars, GET and DELETE still works
    3. Eventually (or never?) we can say that item names just can't contain unsafe chars

    And yet...

    • Proper migration has to happen inside application code, and I don't see a sensible way to define migration code inside rs.js, since apps themselves (can) decide the filenames. The only thing I can see rs.js doing on that front would be something as simple as emitting warnings for invalid item names passed by the app.
  • The restriction would be really unfortunate for applications that don't have a thick "model" abstraction over the filesystem, such as Sharesome. In some of those cases it might be necessary to fully preserve the name of the file provided by the user.

  • The evidence for server-side URL encoding bugs being a huge problem is purely anecdotal and based on the implementations I've seen while working on a WebDAV client. It's really hard to make a convincing argument like that.

What to do instead?

  • We could abandon all mention of URIs, and mention IRIs everywhere. #128
  • At the moment we IMO overspecify URI encoding behavior, partially in disagreement with RFCs the RS spec is based on. We should really, really make sure not to confuse the implementor. See #103 and #119