mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-02-15 09:14:25 +01:00
Fixed htpasswd. Now produces passwords for any string
This commit is contained in:
@@ -6,8 +6,10 @@ module.exports = async ( password ) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
password = password.replace(/'/g, `'\\''`);
|
||||
|
||||
return await new Promise( (resolve) => {
|
||||
exec('htpasswd -bnB admin '+password+' | cut -sd \':\' -f2', (error, stdout, stderr) => {
|
||||
exec('htpasswd -bnB admin \''+password+'\' | cut -sd \':\' -f2', (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
return resolve(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user