2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2013-09-16 18:04:20 +02:00
|
|
|
|
2015-10-24 22:58:24 +02:00
|
|
|
#include "login-util.h"
|
2015-11-16 22:09:36 +01:00
|
|
|
#include "string-util.h"
|
2013-09-16 04:26:56 +02:00
|
|
|
|
|
|
|
bool session_id_valid(const char *id) {
|
|
|
|
|
2015-04-30 00:47:41 +02:00
|
|
|
if (isempty(id))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return id[strspn(id, LETTERS DIGITS)] == '\0';
|
2013-09-16 04:26:56 +02:00
|
|
|
}
|