Benjamin Woodruff
836582fdb1
Fix failing tests for uri encoding auth
...
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.
2016-03-16 14:31:44 -07:00
Benjamin Woodruff
a30c81745a
Add URI encoding to mongo auth parameters
...
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).
2016-03-16 14:31:44 -07:00
Florent Vilmart
86f93e39a7
supports keys marked as false
2016-03-15 20:22:48 -04:00
Florent Vilmart
6e4357c6df
Adds support for apps key in config file, throws if length is > 1
2016-03-15 20:22:48 -04:00
Florent Vilmart
3451fc3430
fixes same bug affecting $select and $dontSelect
2016-03-15 19:13:40 -04:00
Florent Vilmart
3ed3982e0e
Fixes bug affecting matchesQuery and doesNotMatchQuery on relations on unfetched objects
2016-03-15 16:20:32 -04:00
Florent Vilmart
18781f1f82
Removes _PushStatus from system classes, uses direct DB access to write
2016-03-14 10:20:24 -04:00
Florent Vilmart
0bd21cb808
Tweak test with special char
2016-03-14 08:43:27 -04:00
Florent Vilmart
120f23c791
reverts to use binary APNs
2016-03-14 08:15:38 -04:00
Florent Vilmart
7c387e1ee9
Adds support to store push results
2016-03-13 23:37:13 -04:00
Florent Vilmart
dad50d12f5
Upgrade APNS to use HTTP/2
...
- uses universal certificate
- removes tests logs
- standardized returned promises from APNS and GCM to something usable in _PushStatus
2016-03-13 18:15:15 -04:00
Florent Vilmart
a392c088d8
Uses the resolved promise from the adapter
2016-03-12 15:30:12 -05:00
Florent Vilmart
4d401d9daa
Stores the _PushStatus when sending push, set pending, and running states
2016-03-12 14:32:39 -05:00
Florent Vilmart
308fe1498a
Centralizes list of system classes into Schema
2016-03-12 13:40:59 -05:00
Florent Vilmart
2557ea6300
Properly querystring encode the parameters
2016-03-12 10:34:57 -05:00
Florent Vilmart
cadd6fe406
Sanitizes RestWrite.data before passing to inflated object
2016-03-11 23:03:47 -05:00
Florent Vilmart
5c880ca546
serverURL is actually not required
2016-03-11 20:03:40 -05:00
Florent Vilmart
5ef12b55b4
fixes env:PORT
2016-03-11 19:29:51 -05:00
Florent Vilmart
b89619b6ee
Full query support for badge Increment
2016-03-11 16:23:58 -05:00
Florent Vilmart
7d787328c5
Merge pull request #952 from ParsePlatform/flovilmart.OAuthImprovements
...
AuthData logic refactor
2016-03-11 15:38:19 -05:00
Florent Vilmart
daad05a00f
removes key transformation for authData from restWrite, ensures authData is set in hooks
2016-03-11 15:14:53 -05:00
Florent Vilmart
2c991a4726
Merge pull request #956 from supersolid/steven.dboptions
...
Add database options to ParseServer constructor and pass to MongoStorageAdapter
2016-03-11 12:39:30 -05:00
steven-supersolid
6e65a8fc6f
Add test for options being passed to MongoAdapter from DatabaseAdapter
2016-03-11 17:08:39 +00:00
Florent Vilmart
1ed868b99c
Fixes #935 , cleans up authData null keys on login for android crash
2016-03-11 11:14:58 -05:00
Florent Vilmart
bcffcbade2
Fix when multiple authData keys are passed
2016-03-11 09:02:21 -05:00
Mengyan Wang
d42d359437
Merge pull request #959 from ParsePlatform/wangmengyan.do_master_query_for_before/afterHook
...
Do master query for before/afterSaveHook
2016-03-10 22:47:04 -08:00
wangmengyan95
8ea2b615a4
Do master query for before/afterSaveHook
2016-03-10 22:38:07 -08:00
Florent Vilmart
1e7e4fe372
Merge pull request #898 from ParsePlatform/flovilmart.CLPAPI
...
Adds CLP API to Schema router
2016-03-11 00:32:41 -05:00
Florent Vilmart
c935ed8364
Always return default public permissions
2016-03-10 23:01:45 -05:00
Florent Vilmart
16e3529c96
Removes blacklisting, *-but test case
2016-03-10 19:20:05 -05:00
Florent Vilmart
9c5f14981e
Renames oauth to authDataManager in src
2016-03-10 18:14:56 -05:00
Florent Vilmart
54d154f7aa
Centralizes AuthData validation
2016-03-10 18:14:56 -05:00
Florent Vilmart
9aaaf78a36
Anonymous is an OAuth
2016-03-10 18:14:56 -05:00
Florent Vilmart
b1d399bf80
Adds blacklist permission, more test scenarios
2016-03-10 18:02:29 -05:00
Raul Rodriguez
76e6f8c775
Shutdown standalone parse server gracefully
2016-03-10 20:05:28 +01:00
steven-supersolid
dbf2afc5ea
Add database options to ParseServer constructor and pass to MongoStorageAdapter
2016-03-10 16:49:45 +00:00
Florent Vilmart
d71a58c217
Adds tests, improve coverage, adds ability to delete CLP with classLevelPermissions: null
2016-03-10 11:31:37 -05:00
Florent Vilmart
ddd1ae3338
Validates key, values and operation in CLP
2016-03-09 20:19:12 -05:00
Florent Vilmart
e75d233b7e
Adds validation of addFields
2016-03-09 19:33:48 -05:00
Florent Vilmart
64f9fad285
Adds addField in CLP valid keys
2016-03-09 19:33:47 -05:00
Florent Vilmart
5780c1e425
Merges CLP endpoints with POST, PUT and GET
2016-03-09 19:33:47 -05:00
Florent Vilmart
d4fd73100c
Adds CLP API to Schema router
2016-03-09 19:33:47 -05:00
Nikita Lutsenko
d86f0a8c69
Use schema collection instead of adaptive collection for all schema operations.
2016-03-09 15:21:29 -08:00
Nikita Lutsenko
2730398b92
Add new MongoSchemaCollection class that manages schemas for all collections.
2016-03-09 15:20:59 -08:00
Nikita Lutsenko
e93873f7b1
Do not require where clause in condition on queries.
2016-03-08 17:08:27 -08:00
Nikita Lutsenko
b9f08d9694
Do not mutate parameter object in DatabaseController.
2016-03-08 16:08:41 -08:00
Marco129
2f63c5528d
Minimize db query
2016-03-09 02:15:27 +08:00
Florent Vilmart
bd7d951ad6
default encoding is now querystring instead of JSON
2016-03-08 08:12:30 -05:00
Florent Vilmart
6acb5cee80
ES6-ify
2016-03-08 08:04:34 -05:00
Florent Vilmart
982fc72327
Adds HTTPResponse object and lazy loading text and JSON
2016-03-08 07:56:17 -05:00