Skip to content
This repository has been archived by the owner on Nov 6, 2021. It is now read-only.

Commit

Permalink
Moves require to inside decryption context
Browse files Browse the repository at this point in the history
There was an issue where if a require was actually a function call itself (leveraging middleware), it would run outside the context  of decryption and could cause issues.
  • Loading branch information
shortjared committed Jul 6, 2016
1 parent b220cf8 commit 7e8bf45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/decryptors/nodejs4.3/_serverless_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ for (var key in envVars) {
process.env[key] = envVars[key];
}

var originalHandler = __HANDLER_REQUIRE__;

module.exports.handler = function(event, context, callback) {
decryptor(function(){
var originalHandler = __HANDLER_REQUIRE__;
return originalHandler(event, context, callback);
});
};

0 comments on commit 7e8bf45

Please sign in to comment.