Low: attrd: Ensure set ID is non-empty
Previously, if attr->set_id were the empty string, attrd_set_id() would
pass a copy to crm_xml_sanitize_id(). In that case, there's nothing to
sanitize and thus no way for crm_xml_sanitize_id() to turn its argument
into a valid XML ID (other than performing a realloc() and storing
arbitrary charactrs).
It's better to treat an empty attr->set_id the same as a NULL one, and
use the default set ID in that case.
(It is possible for attr->set_id to be the empty string because it may
be arbitrary user input from CLI tools.)
As of this commit, all callers of crm_xml_sanitize_id() are guaranteed
to pass a non-empty string as the argument.
This is technically a behavioral change, but it's quite an edge case,
and the existing behavior is problematic.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>