Skip to content

Commit

Permalink
fix: escape backslashes in conf template paths
Browse files Browse the repository at this point in the history
  • Loading branch information
davewasmer committed Apr 27, 2017
1 parent f854a0e commit 2354eb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ export default async function devcert(appName: string, options: Options = {}) {
async function installCertificateAuthority(installCertutil: boolean): Promise<void> {
debug(`generating openssl configuration`);
let confTemplate = readFileSync(opensslConfTemplate, 'utf-8');
confTemplate = confTemplate.replace(/DATABASE_PATH/, configPath('index.txt'));
confTemplate = confTemplate.replace(/SERIAL_PATH/, configPath('serial'));
confTemplate = confTemplate.replace(/DATABASE_PATH/, configPath('index.txt').replace('\\', '\\\\'));
confTemplate = confTemplate.replace(/SERIAL_PATH/, configPath('serial').replace('\\', '\\\\'));
confTemplate = eol.auto(confTemplate);
writeFileSync(opensslConfPath, confTemplate);
debug(`generating root certificate authority key`);
Expand Down

0 comments on commit 2354eb0

Please sign in to comment.