Skip to content

Commit

Permalink
fix(admin): outdated master key warning check (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
kon14 committed Jul 24, 2022
1 parent 04549b0 commit 15af18e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/admin/src/middleware/Admin.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export function getAdminMiddleware(conduit: ConduitCommons) {
return next();
}
const masterKey = req.headers.masterkey;
if (!process.env.masterkey || process.env.masterkey.length === 0) {
if (
(!process.env.MASTER_KEY || process.env.MASTER_KEY.length === 0) &&
(!process.env.masterkey || process.env.masterkey.length === 0)
) {
ConduitGrpcSdk.Logger.warn(
'!Security issue!: Master key not set, defaulting to insecure string',
);
Expand Down

0 comments on commit 15af18e

Please sign in to comment.