mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
sanitize version_string we got from the wire (#8582)
`version_string` is meant to be displayed by UI, and comes from the wire. therefore, as a general precaution, ensure a string that is regarded as a typical version string. all versions in scope are currently v123.456.789-shortsuffix, where suffix is a-z and mostly unused in production. that is the base. we can adapt if there is really a need, but not for theoretical version strings. as we do not stop processing, things are not bad even if we missed a valid usecase herr. moreover, if `version_string` is empty, we skip the candidate - as we cannot display something useful to the user. that little bit of care is expected from relays :)
This commit is contained in:
@@ -9,7 +9,9 @@ pub struct JsonrpcAppSource {
|
||||
/// Always increasing version number.
|
||||
pub version_integer: u32,
|
||||
|
||||
/// Any version string.
|
||||
/// Version string that should be shown to the user.
|
||||
/// UI must not linkify the string
|
||||
/// as it may be interpreted like a phone number or an IP address.
|
||||
pub version_string: String,
|
||||
|
||||
/// Where to download that version.
|
||||
|
||||
Reference in New Issue
Block a user