Skip to content

Commit 4450207

Browse files
authored
Merge branch 'master' into flow-type-storage-adapter
2 parents f333f10 + c549663 commit 4450207

16 files changed

+541
-161
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ If you have a non-bug question, ask on Stack Overflow or Server Fault:
44
- https://stackoverflow.com/questions/tagged/parse.com
55
- https://serverfault.com/tags/parse
66

7+
If you have a vulnerability disclosure, please follow our policy available here https://github.com/parse-community/parse-server/blob/master/SECURITY.md
8+
79
You may also search through existing issues before opening a new one: https://github.com/parse-community/parse-server/issues?utf8=%E2%9C%93&q=is%3Aissue
810

911
--- Please use this template. If you don't use this template, your issue may be closed without comment. ---

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ before_script:
4141
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d parse_server_postgres_adapter_test_database
4242
- psql -c 'CREATE EXTENSION postgis_topology;' -U postgres -d parse_server_postgres_adapter_test_database
4343
- silent=1 mongodb-runner --start
44+
script:
45+
- npm run coverage
4446
after_script:
4547
- bash <(curl -s https://codecov.io/bash)
4648

@@ -52,7 +54,7 @@ jobs:
5254
env:
5355
before_script: skip
5456
after_script: skip
55-
script: npm install -g nsp && nsp check
57+
script: skip
5658
deploy:
5759
- provider: script
5860
skip_cleanup: true

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@
33
### master
44
[Full Changelog](https://github.com/parse-community/parse-server/compare/2.7.0...master)
55

6+
### 2.7.1
7+
[Full Changelog](https://github.com/parse-community/parse-server/compare/2.7.1...2.7.0)
8+
9+
:warning: Fixes a security issue affecting Class Level Permissions
10+
11+
* Adds support for dot notation when using matchesKeyInQuery, thanks to [Henrik](https://github.com/bohemima) and [Arthur Cinader](https://github.com/acinader)
12+
613
### 2.7.0
714
[Full Changelog](https://github.com/parse-community/parse-server/compare/2.7.0...2.6.5)
815

16+
:warning: This version contains an issue affecting Class Level Permissions on mongoDB. Please upgrade to 2.7.1.
17+
918
Starting parse-server 2.7.0, the minimun nodejs version is 6.11.4, please update your engines before updating parse-server
1019

1120
#### New Features:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ You can also use other email adapters contributed by the community such as:
337337
- [parse-server-sendinblue-adapter](https://www.npmjs.com/package/parse-server-sendinblue-adapter)
338338
- [parse-server-mailjet-adapter](https://www.npmjs.com/package/parse-server-mailjet-adapter)
339339
- [simple-parse-smtp-adapter](https://www.npmjs.com/package/simple-parse-smtp-adapter)
340+
- [parse-server-generic-email-adapter](https://www.npmjs.com/package/parse-server-generic-email-adapter)
340341

341342
### Using environment variables to configure Parse Server
342343

SECURITY.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Parse Community Vulnerability Disclosure Program
2+
If you believe you have found a security vulnerability on one of parse-community maintained packages,
3+
we encourage you to let us know right away.
4+
We will investigate all legitimate reports and do our best to quickly fix the problem.
5+
Before reporting though, please review this page including and those things that should not be reported.
6+
7+
# Responsible Disclosure Policy
8+
If you comply with the policies below when reporting a security issue to parse community,
9+
we will not initiate a lawsuit or law enforcement investigation against you in response to your report.
10+
We ask that:
11+
12+
- You give us reasonable time to investigate and mitigate an issue you report before making public any information about the report or sharing such information with others. This means we request _at least_ **7 days** to get back to you with an initial response and _at least_ **30 days** from initial contact (made by you) to apply a patch.
13+
- You do not interact with an individual account (which includes modifying or accessing data from the account) if the account owner has not consented to such actions.
14+
- You make a good faith effort to avoid privacy violations and disruptions to others, including (but not limited to) destruction of data and interruption or degradation of our services.
15+
- You do not exploit a security issue you discover for any reason. (This includes demonstrating additional risk, such as attempted compromise of sensitive company data or probing for additional issues). You do not violate any other applicable laws or regulations.
16+
17+
# Communicating with us
18+
19+
All vulnerability should be privately reported to either [Node Security](https://nodesecurity.io/report) or directly to us at the following address [security at parseplatform dot org](mailto:[email protected])
20+
21+
You can use our PGP public key, which is also uploaded [here](hkp://pgp.mit.edu):
22+
23+
```
24+
-----BEGIN PGP PUBLIC KEY BLOCK-----
25+
26+
mQINBFoi200BEACnFHa4Atvw62TjpI5uDtyOF1Ab6gd6898ITXlzFVlAoiqTBE2o
27+
S3H9vCe6w32HkTqyKiymdk50mAaDJrEOyAZSqj0gc4r7vmCx2s7f3iO9A9PEGsHj
28+
UROnkJ5v2su1Dk95XQrbrR4JyNvFMLLqEbdK78Mhx/Xd5QqOD8pop0cS8pF1f1Mb
29+
3MiZb3bxFj+7n+KC80C2+CNyJt95alVnq2MuwbEuwTJQV5CEgRqzBCov9qnLgloK
30+
w7YP4YLkKZoMZQ45mWCUTmn8YIa9PabDLXUhlKv3MQInhnJIELb+jSKO96glHr6p
31+
DpFf0pwRfsuoIhy3jaO7K/ws5uZY3/Ae3gjrAlOB8jhae0POWSwEM+iWHg3wcjpt
32+
lRdu/OgPXqKIgMAXw6Kx9XrskEhOI9ZQfHZlK3HL4ArSdtGYIO5pVNeRssljJvJm
33+
G5HJuGBaPCQNYX7BWJkXFF0HYV6Ke2JDXGVSM4ubPJsZcA4Yx7SYyvuOsNgqHOFM
34+
9snfPfAPAhu/4zCYNCO2NNBc7HaH+qwIvveWX5tTGe6UpX/wOcD8xkoEn+UygQbO
35+
lwu+kjFn8H6RlDChPR65aJTU5Lu0kqRnej1gCjYzOS6AjFOjLuRBlRaey+myhQHO
36+
TbII9nkYI3abYhD8Di77Ve6XFMQI1grPGaqNp6ZLfej1u8PExpclzxTbtQARAQAB
37+
tDdQYXJzZVBsYXRmb3JtLm9yZyBTZWN1cml0eSA8c2VjdXJpdHlAcGFyc2VwbGF0
38+
Zm9ybS5vcmc+iQI9BBMBCgAnBQJaIttNAhsDBQkHhh+ABQsJCAcDBRUKCQgLBRYC
39+
AwEAAh4BAheAAAoJEOaNxtHMZ3/L13EP/2X4i0h1Jidr0GN6t7LUJFDBDHxn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MOb+JVMazMUyrU9XaGuP4Y
72+
Co6fHPyjrvmE5DtU5Vp8O68ZpOYrkM6X22dIQpPi6atm
73+
=o7Nx
74+
-----END PGP PUBLIC KEY BLOCK-----
75+
```

package.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "2.7.0",
3+
"version": "2.7.1",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {
@@ -30,10 +30,10 @@
3030
"intersect": "1.0.1",
3131
"lodash": "4.17.4",
3232
"lru-cache": "4.1.1",
33-
"mime": "2.0.3",
33+
"mime": "2.0.5",
3434
"mongodb": "2.2.33",
3535
"multer": "1.3.0",
36-
"parse": "1.10.2",
36+
"parse": "1.11.0",
3737
"pg-promise": "7.3.2",
3838
"redis": "2.8.0",
3939
"request": "2.83.0",
@@ -42,7 +42,7 @@
4242
"uuid": "^3.1.0",
4343
"winston": "2.4.0",
4444
"winston-daily-rotate-file": "1.7.2",
45-
"ws": "3.3.2"
45+
"ws": "3.3.3"
4646
},
4747
"devDependencies": {
4848
"babel-cli": "6.26.0",
@@ -52,7 +52,7 @@
5252
"babel-plugin-transform-object-rest-spread": "^6.26.0",
5353
"babel-preset-env": "1.6.1",
5454
"bcrypt-nodejs": "0.0.3",
55-
"cross-env": "5.1.1",
55+
"cross-env": "5.1.3",
5656
"deep-diff": "0.3.8",
5757
"eslint": "^4.9.0",
5858
"eslint-plugin-flowtype": "^2.39.1",
@@ -70,10 +70,8 @@
7070
"lint": "flow && eslint --cache ./",
7171
"build": "babel src/ -d lib/ --copy-files",
7272
"pretest": "npm run lint",
73-
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 $COVERAGE_OPTION jasmine",
74-
"test:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 jasmine",
75-
"coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/nyc' npm test",
76-
"coverage:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 node ./node_modules/.bin/nyc ./node_modules/jasmine/bin/jasmine.js",
73+
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 jasmine",
74+
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 nyc jasmine",
7775
"start": "node ./bin/parse-server",
7876
"prepublish": "npm run build"
7977
},

spec/LogsRouter.spec.js

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,93 @@ describe('LogsRouter', () => {
6262
done();
6363
});
6464
});
65+
66+
const headers = {
67+
'X-Parse-Application-Id': 'test',
68+
'X-Parse-REST-API-Key': 'rest',
69+
'X-Parse-Master-Key': 'test'
70+
};
71+
72+
/**
73+
* Verifies simple passwords in GET login requests with special characters are scrubbed from the verbose log
74+
*/
75+
it('does scrub simple passwords on GET login', done => {
76+
reconfigureServer({
77+
verbose: true
78+
}).then(function() {
79+
request.get({
80+
headers: headers,
81+
url: 'http://localhost:8378/1/login?username=test&password=simplepass.com'
82+
}, () => {
83+
request.get({
84+
url: 'http://localhost:8378/1/scriptlog?size=4&level=verbose',
85+
json: true,
86+
headers: headers
87+
}, (error, response, body) => {
88+
expect(response.statusCode).toEqual(200);
89+
// 4th entry is our actual GET request
90+
expect(body[3].url).toEqual('/1/login?username=test&password=********');
91+
expect(body[3].message).toEqual('REQUEST for [GET] /1/login?username=test&password=********: {}');
92+
done();
93+
});
94+
});
95+
});
96+
});
97+
98+
/**
99+
* Verifies complex passwords in GET login requests with special characters are scrubbed from the verbose log
100+
*/
101+
it('does scrub complex passwords on GET login', done => {
102+
reconfigureServer({
103+
verbose: true
104+
}).then(function() {
105+
request.get({
106+
headers: headers,
107+
// using urlencoded password, 'simple @,/?:&=+$#pass.com'
108+
url: 'http://localhost:8378/1/login?username=test&password=simple%20%40%2C%2F%3F%3A%26%3D%2B%24%23pass.com'
109+
}, () => {
110+
request.get({
111+
url: 'http://localhost:8378/1/scriptlog?size=4&level=verbose',
112+
json: true,
113+
headers: headers
114+
}, (error, response, body) => {
115+
expect(response.statusCode).toEqual(200);
116+
// 4th entry is our actual GET request
117+
expect(body[3].url).toEqual('/1/login?username=test&password=********');
118+
expect(body[3].message).toEqual('REQUEST for [GET] /1/login?username=test&password=********: {}');
119+
done();
120+
});
121+
});
122+
});
123+
});
124+
125+
/**
126+
* Verifies fields in POST login requests are NOT present in the verbose log
127+
*/
128+
it('does not have password field in POST login', done => {
129+
reconfigureServer({
130+
verbose: true
131+
}).then(function() {
132+
request.post({
133+
headers: headers,
134+
url: 'http://localhost:8378/1/login',
135+
data: {
136+
username: 'test',
137+
password: 'simplepass.com'
138+
}
139+
}, () => {
140+
request.get({
141+
url: 'http://localhost:8378/1/scriptlog?size=4&level=verbose',
142+
json: true,
143+
headers: headers
144+
}, (error, response, body) => {
145+
expect(response.statusCode).toEqual(200);
146+
// 4th entry is our actual GET request
147+
expect(body[3].url).toEqual('/1/login');
148+
expect(body[3].message).toEqual('REQUEST for [POST] /1/login: {}');
149+
done();
150+
});
151+
});
152+
});
153+
});
65154
});

spec/ParseQuery.Aggregate.spec.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ describe('Parse.Query Aggregate testing', () => {
254254
rp.get(Parse.serverURL + '/aggregate/TestObject', options)
255255
.then((resp) => {
256256
resp.results.forEach((result) => {
257-
expect(result.name !== undefined).toBe(true);
257+
expect(result.objectId).not.toBe(undefined);
258+
expect(result.name).not.toBe(undefined);
258259
expect(result.sender).toBe(undefined);
259260
expect(result.size).toBe(undefined);
260261
expect(result.score).toBe(undefined);
@@ -263,6 +264,25 @@ describe('Parse.Query Aggregate testing', () => {
263264
}).catch(done.fail);
264265
});
265266

267+
it('multiple project query', (done) => {
268+
const options = Object.assign({}, masterKeyOptions, {
269+
body: {
270+
project: { name: 1, score: 1, sender: 1 },
271+
}
272+
});
273+
rp.get(Parse.serverURL + '/aggregate/TestObject', options)
274+
.then((resp) => {
275+
resp.results.forEach((result) => {
276+
expect(result.objectId).not.toBe(undefined);
277+
expect(result.name).not.toBe(undefined);
278+
expect(result.score).not.toBe(undefined);
279+
expect(result.sender).not.toBe(undefined);
280+
expect(result.size).toBe(undefined);
281+
});
282+
done();
283+
}).catch(done.fail);
284+
});
285+
266286
it('project with group query', (done) => {
267287
const options = Object.assign({}, masterKeyOptions, {
268288
body: {

0 commit comments

Comments
 (0)