sd-device: use string_is_safe() at one more place
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
#include "utf8.h"
|
||||
|
||||
int device_new_aux(sd_device **ret) {
|
||||
sd_device *device;
|
||||
@@ -97,10 +96,10 @@ static bool property_is_valid(const char *key, const char *value) {
|
||||
return true;
|
||||
|
||||
/* refuse invalid UTF8 and control characters */
|
||||
if (!utf8_is_valid(value) || string_has_cc(value, /* ok= */ NULL))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return string_is_safe(value,
|
||||
STRING_ALLOW_BACKSLASHES |
|
||||
STRING_ALLOW_QUOTES |
|
||||
STRING_ALLOW_GLOBS);
|
||||
}
|
||||
|
||||
int device_add_property_aux(sd_device *device, const char *key, const char *value, bool db) {
|
||||
|
||||
Reference in New Issue
Block a user