Mercurial Hosting > hghosting
comparison update_repositories.luan @ 16:50a1fe272c10
more security
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 01 Oct 2023 21:36:34 -0600 |
parents | c560b4e2f056 |
children |
comparison
equal
deleted
inserted
replaced
15:a6e72cd199f1 | 16:50a1fe272c10 |
---|---|
106 nginx_dir.mkdir() | 106 nginx_dir.mkdir() |
107 local htpasswds = {} | 107 local htpasswds = {} |
108 do | 108 do |
109 local writer = nginx_dir.child("_all.pass").text_writer() | 109 local writer = nginx_dir.child("_all.pass").text_writer() |
110 for user, password in pairs(config.users) do | 110 for user, password in pairs(config.users) do |
111 local htpasswd = uri("bash:htpasswd -nb "..user.." "..password).read_text() | 111 local htpasswd = uri("bash:htpasswd -nb '"..user.."' '"..password.."'").read_text() |
112 htpasswd = trim(htpasswd) | 112 htpasswd = trim(htpasswd) |
113 print_to( writer, htpasswd ) | 113 print_to( writer, htpasswd ) |
114 htpasswds[user] = htpasswd | 114 htpasswds[user] = htpasswd |
115 end | 115 end |
116 writer.close() | 116 writer.close() |