Skip to content

Commit

Permalink
fix: Do not inherit app object from Object prototype (#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Jan 2, 2019
1 parent 8e129d8 commit ed8c2e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ node_modules

# Distributables
dist/
.nyc_output/
5 changes: 4 additions & 1 deletion packages/feathers/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ const Proto = require('uberproto');
const Application = require('./application');
const version = require('./version');
const { ACTIVATE_HOOKS, activateHooks } = require('./hooks');
// A base object Prototype that does not inherit from a
// potentially polluted Object prototype
const baseObject = Object.create(null);

function createApplication () {
const app = {};
const app = Object.create(baseObject);

// Mix in the base application
Proto.mixin(Application, app);
Expand Down

0 comments on commit ed8c2e4

Please sign in to comment.