Software / code / prosody
Comparison
util/prosodyctl/shell.lua @ 13796:c8e534b4f2e2 13.0
mod_admin_shell, prosodyctl shell: Report command failure when no password entered (fixes #1907)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 31 Mar 2025 17:30:50 +0100 |
| parent | 13770:a28349b8a387 |
comparison
equal
deleted
inserted
replaced
| 13794:471b676e64eb | 13796:c8e534b4f2e2 |
|---|---|
| 132 if stanza.name ~= "repl-request-input" then | 132 if stanza.name ~= "repl-request-input" then |
| 133 return; | 133 return; |
| 134 end | 134 end |
| 135 if stanza.attr.type == "password" then | 135 if stanza.attr.type == "password" then |
| 136 local password = human_io.read_password(); | 136 local password = human_io.read_password(); |
| 137 client.send(st.stanza("repl-requested-input", { type = stanza.attr.type, id = stanza.attr.id }):text(password)); | 137 client.send(st.stanza("repl-requested-input", { |
| 138 type = stanza.attr.type; | |
| 139 id = stanza.attr.id; | |
| 140 status = password and "submit" or "cancel"; | |
| 141 }):text(password or "")); | |
| 138 else | 142 else |
| 139 io.stderr:write("Internal error - unexpected input request type "..tostring(stanza.attr.type).."\n"); | 143 io.stderr:write("Internal error - unexpected input request type "..tostring(stanza.attr.type).."\n"); |
| 140 os.exit(1); | 144 os.exit(1); |
| 141 end | 145 end |
| 142 return true; | 146 return true; |