summaryrefslogtreecommitdiffstats
path: root/src/basic/login-util.c
blob: 085ccd09154a4af16d3cc0070b8caaee86392327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* SPDX-License-Identifier: LGPL-2.1+ */

#include <string.h>

#include "login-util.h"
#include "string-util.h"

bool session_id_valid(const char *id) {

        if (isempty(id))
                return false;

        return id[strspn(id, LETTERS DIGITS)] == '\0';
}