Fix wo secure --auth on Ubuntu 22.04

This commit is contained in:
VirtuBox
2022-09-16 17:19:18 +02:00
parent f89896d15d
commit ce244cfbc5
3 changed files with 4 additions and 3 deletions

View File

@@ -49,6 +49,7 @@
- **Modern** : Strong ciphers_suite, modern TLS protocols and HSTS support (Grade A+ on [ssllabs](https://www.ssllabs.com/ssltest/analyze.html?d=demo.wordops.eu&latest))
- **Monitoring** : Live Nginx vhost traffic with ngx_vts_module and server monitoring with Netdata
- **User Friendly** : WordOps dashboard with server status/monitoring and tools ([demo](https://demo.wordops.eu))
- **Release cycle** : WordOps stable releases are published in June and December.
---

View File

@@ -83,11 +83,11 @@ class WOSecureController(CementBaseController):
if password == "":
pargs.user_pass = passwd
Log.debug(self, "printf username:"
"$(openssl passwd -crypt "
"$(openssl passwd --apr1 "
"password 2> /dev/null)\n\""
"> /etc/nginx/htpasswd-wo 2>/dev/null")
WOShellExec.cmd_exec(self, "printf \"{username}:"
"$(openssl passwd -crypt "
"$(openssl passwd -apr1 "
"{password} 2> /dev/null)\n\""
"> /etc/nginx/htpasswd-wo 2>/dev/null"
.format(username=pargs.user_input,

View File

@@ -329,7 +329,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
try:
WOShellExec.cmd_exec(
self, "printf \"WordOps:"
"$(openssl passwd -crypt "
"$(openssl passwd -apr1 "
"{password} 2> /dev/null)\n\""
"> /etc/nginx/htpasswd-wo "
"2>/dev/null"