diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-09-15 22:26:56 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-09-16 09:58:37 -0500 |
commit | 4b549144d82ea0f368321d149215f577049fffa6 (patch) | |
tree | ee916708f2758a03690c6c0770cc238aa8757e91 /src/shared/unit-name.c | |
parent | 1244d8d640a2644aa8dc8e588cd9c414b3d39163 (diff) |
Verify validity of session name when received from outside
Only ASCII letters and digits are allowed.
Diffstat (limited to 'src/shared/unit-name.c')
-rw-r--r-- | src/shared/unit-name.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 1baa6eb7e5..8f6c28e86a 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -26,11 +26,10 @@ #include "path-util.h" #include "util.h" #include "unit-name.h" +#include "def.h" #define VALID_CHARS \ - "0123456789" \ - "abcdefghijklmnopqrstuvwxyz" \ - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ + DIGITS LETTERS \ ":-_.\\" static const char* const unit_type_table[_UNIT_TYPE_MAX] = { |