Skip to content

Commit c2bfb63

Browse files
committed
server: collection: Use ascii_alphanumeric
When sanitizing. As per the DBus spec [1] a path can only contain [a-zA-Z0-9_]. Note that any such error would have been caught by OwnedPath::try_from, but this allows more labels to be sanitized before they error out. [1] https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
1 parent cf7b9a9 commit c2bfb63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/collection/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ impl Collection {
394394
let sanitized_label = label
395395
.chars()
396396
.map(|c| {
397-
if c.is_alphanumeric() || c == '_' {
397+
if c.is_ascii_alphanumeric() || c == '_' {
398398
c
399399
} else {
400400
'_'

0 commit comments

Comments
 (0)