Browse Source

Remove password options from `serve` unlock (#5601)

These options are no longer considered safe as the file location or
environment variable could be guessed by an attacker.
pull/5589/head
Matt Gibson 3 years ago committed by GitHub
parent
commit
a2b290a31e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/cli/src/commands/serve.command.ts

4
apps/cli/src/commands/serve.command.ts

@ -245,6 +245,10 @@ export class ServeCommand { @@ -245,6 +245,10 @@ export class ServeCommand {
});
router.post("/unlock", async (ctx, next) => {
// Do not allow guessing password location through serve command
delete ctx.request.query.passwordFile;
delete ctx.request.query.passwordEnv;
const response = await this.unlockCommand.run(
ctx.request.body.password == null ? null : (ctx.request.body.password as string),
ctx.request.query

Loading…
Cancel
Save