string-util: do not accept ',' in version strings

Allowing this apparently has been cargo-culted from my initial sysupdate
PR, but Claude and me could not find a single other software package
that uses "," as a character within version strings. Hence, let's remove
this, even though this is a compat breakage of a kind, in the hope
nobody notices. We can easily restore this if this later shows to be an
issue for people.
This commit is contained in:
Lennart Poettering
2026-07-14 22:32:27 +02:00
parent b14e60c983
commit 6acae8d17d
+2 -2
View File
@@ -1469,8 +1469,8 @@ bool version_is_valid(const char *s) {
if (!filename_part_is_valid(s))
return false;
/* This is a superset of the characters used by semver. We additionally allow "," and "_". */
if (!in_charset(s, ALPHANUMERICAL ".,_-+"))
/* This is a superset of the characters used by semver. We additionally allow "_". */
if (!in_charset(s, ALPHANUMERICAL "._-+"))
return false;
return true;