Skip to content

Commit

Permalink
FIX reported security problem with the query builders mquery api
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey committed Dec 12, 2020
1 parent 5e33746 commit b72ea77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Bugfixes:
Other:
- Added `name` identifier to `RxPlugin`
- Throw error when `dev-mode` plugin is added multiple times because there is no way that this was done intentional likely the developer has mixed core and default usage of RxDB.
- Fix reported security problem with the query builders mquery api.

### 9.10.1 (23 November 2020)

Expand Down
9 changes: 9 additions & 0 deletions src/plugins/query-builder/mquery/mquery-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
* @link https://github.com/aheckmann/mquery/blob/master/lib/utils.js
*/


/**
* @link https://github.com/aheckmann/mquery/commit/792e69fd0a7281a0300be5cade5a6d7c1d468ad4
*/
const SPECIAL_PROPERTIES = ['__proto__', 'constructor', 'prototype'];

/**
* Merges 'from' into 'to' without overwriting existing properties.
*/
export function merge(to: any, from: any): any {
Object.keys(from)
.forEach(key => {
if (SPECIAL_PROPERTIES.includes(key)) {
return;
}
if (typeof to[key] === 'undefined') {
to[key] = from[key];
} else {
Expand Down

0 comments on commit b72ea77

Please sign in to comment.