1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 3 #include "login-util.h" 4 #include "string-util.h" 5 session_id_valid(const char * id)6 bool session_id_valid(const char *id) { 7 8 if (isempty(id)) 9 return false; 10 11 return id[strspn(id, LETTERS DIGITS)] == '\0'; 12 } 13