Restrict set of filenames allowed
Closed this issue · 1 comments
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:
- Next draft: it is recommended that clients don't use unsafe chars for PUT
- Next draft: servers MUST reject PUT with unsafe chars, GET and DELETE still works
- 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?