raforg / danectl

DNSSEC DANE implementation manager
https://raf.org/danectl
GNU General Public License v2.0
22 stars 5 forks source link

Can't handle domains with "-" in them #11

Closed thomas-mm closed 1 year ago

thomas-mm commented 1 year ago

danectl replaces "." with "_" in the function shcertname() but the script fails for domains with a "-" in them with an error as the printf invocation in tlsa_role() then gets confused. Possibly other characters may cause issues too, I don't know.

I fixed this by changing the "sed" invocation in shcertname() to also replace "-" with "" but feels like a broader solution might be needed to replace any non-alphanumeric with "".

raforg commented 1 year ago

Thanks. How did I not think of that? It's fixed now.

This also makes me realise that there's no support for Unicode domain names. I've added support for that too.