* destructuring in DB controller
* deleteObject in db adapter
* Turns out we can't have delete by object ID because of ACLs...
* Fix tests
* destructure acl
* Don't reject with object
* Tidy up transformKeyValue
* Specialize transformKeyValue for object creation
* remove keys that never appear in creation requests
* rename function
* remove local var
* early exit for simple keys
* Refactor create
* Force class creation when creating an object
* Pass parameters to key value transformer
* No need to check for array in this func
* start using Parse Format schema in MongoTransform
* Remove call to getExpectedType
* add tests to ensure client can't see _PushStatus
* Moves transform to MongoTransform
- Adds ACL query injection in MongoTransform
* Removes adaptiveCollection from DatabaseController
- All collections manipulations are now handled by a DBController
- Adds optional flags to configure an unsafe databaseController for direct
access
- Adds ability to configure RestWrite with multiple writes
- Moves some transfirmations to MongoTransform as they output specific code
* Renames Unsafe to WithoutValidation
* Remove collection prefix from DB Controller
* Remove collection prefix from cache
* Revert "Remove collection prefix from cache"
This reverts commit 529d67dd617b64c69c36a8a63382456e95edcab8.
* Remove knowledge of default mongo URI from Parse Server
* Remove adaptive collection paramater from deleteFields
* Tidy up DBAdapter.js
This uses a *slightly* patched version of node's uri module to allow
commas and colons in hostnames, which causes the parsed representation
of replica sets to be less-awful.
Hostname are still somewhat broken in this representation, because we
have an array of hosts expressed as a list, but this is the
minimum-effort solution to getting format to be able to reprint a parsed
replica set correctly.
I understand that we probably don't want to merge this (for a lot of
reasons), but at least this shows exactly where the issue is, and yields
some useful discussion.
The mongodb driver requires auth values be URI encoded:
044063097d
This uses node's built-in url module to encode the auth portion, by
parsing and re-formatting it, which causes special characters to get URI
encoded properly:
https://nodejs.org/api/url.html#url_escaped_characters
This is all a bit silly since mongodb just takes our passed uri, and
runs it through the same url parser again, but not before explicitly
erroring on '@' characters in the uri.
This is similiar to #148 (reverted by #297), but with much less code,
and hopefully less breakage. Also, note that `uri_decode_auth` is no
longer needed. That was removed in the above referenced
node-mongodb-native commit.
I've tested this on usernames and passwords with @, !, +, and a space.
Presumably this would also work with usernames and passwords that are
already URI encoded (since parseUrl will simply unescape it, and
formatUrl will escape it again).