0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-30 22:34:10 -05:00

fix wrong htpasswd file location (#3750)

This commit is contained in:
Juan Picado 2023-04-21 23:31:11 +02:00 committed by GitHub
parent f86f9244f2
commit 09753cc1fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'verdaccio-htpasswd': patch
---
fix wrong htpasswd file location

View file

@ -1,6 +1,6 @@
import buildDebug from 'debug';
import fs from 'fs';
import { dirname, join, resolve } from 'path';
import { dirname, resolve } from 'path';
import { pluginUtils } from '@verdaccio/core';
import { unlockFile } from '@verdaccio/file-locking';
@ -90,7 +90,7 @@ export default class HTPasswd
throw new Error('should specify "file" in config');
}
debug('config path: %s', options?.config?.configPath);
this.path = join(resolve(dirname(options?.config?.configPath ?? '')), file);
this.path = resolve(dirname(options?.config?.configPath), file);
this.logger.info({ file: this.path }, 'using htpasswd file: @{file}');
debug('htpasswd path:', this.path);
if (config.slow_verify_ms) {