#1869 prosodyctl cert generate throws attempt to concatenate a nil value on invalid hostnames

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

    What steps will reproduce the problem? 1. VirtualHost "foo_bar" in config 2. prosodyctl cert generate foo_bar What is the expected output? No unhandled error / traceback. Probably a rejection of the illegal hostname from somewhere. What do you see instead? lua: ./prosodyctl:635: ./util/openssl.lua:109: attempt to concatenate a nil value stack traceback: ./util/openssl.lua:109: in method 'add_sRVName' ./util/openssl.lua:128: in method 'from_prosody' ./util/prosodyctl/cert.lua:46: in field 'config' ./util/prosodyctl/cert.lua:143: in function <./util/prosodyctl/cert.lua:136> (...tail calls...) ./prosodyctl:751: in upvalue 'func' ./util/async.lua:144: in function <./util/async.lua:142> stack traceback: [C]: in function 'error' ./prosodyctl:635: in local 'handler' ./util/async.lua:232: in method 'run' ./prosodyctl:754: in main chunk [C]: in ? What version of the product are you using? da9be0ad4bbc (0.12) Please provide any additional information below. Underscore (_) is illegal in hostnames and thus in certificates, and the IDNA to_ascii() operation rejects this, the resulting nil goes into a concatenation. Technic

New comment

Not published. Used for spam prevention and optional update notifications.