#779 prosodyctl check not aware of bare jid hosts

Reporter Zash
Owner Zash
Created
Updated
Stars ★ (1)  
Tags
  • Milestone-0.10
  • Status-Fixed
  • Type-Defect
  • Priority-Medium
  1. Zash on

    What steps will reproduce the problem? 1. Component "foo@bar" 2. Have certificate for "bar" 3. prosodyctl check What is the expected output? Duno, ignore that maybe? What do you see instead? x509 info Host foo@bar failed IDNA ToASCII operation

  2. Zash on

    Changes
    • tags Milestone-0.10
  3. Zash on

    How about this: diff -r 56abe6a8e761 prosodyctl --- a/prosodyctl Tue Nov 29 08:20:42 2016 +0100 +++ b/prosodyctl Tue Nov 29 08:51:48 2016 +0100 @@ -1220,7 +1220,15 @@ function commands.check(arg) print("This version of LuaSec (" .. ssl._VERSION .. ") does not support certificate checking"); cert_ok = false else - for host in enabled_hosts() do + local function skip_bare_jid_hosts(host) + -- See issue #779 + if jid_split(host) then + print("Skipping checks for "..host.." because reasons"); -- FIXME How to word this? + return false; + end + return true; + end + for host in it.filter(skip_bare_jid_hosts, enabled_hosts()) do print("Checking certificate for "..host); -- First, let's find out what certificate this host uses. local host_ssl_config = config.rawget(host, "ssl")

  4. MattJ on

    Changes
    • tags Status-Accepted
  5. Zash on

    This just needs some wordsmithing and the above patch.

  6. Zash on

    Maybe just silently ignore such hosts?

  7. Zash on

    Committed without message for now: https://hg.prosody.im/0.10/rev/331caee0c774

    Changes
    • tags Status-Fixed
    • owner Zash

New comment