SecurityManager: Restrict valid author token values

This commit is contained in:
Richard Hansen 2022-02-28 19:27:52 -05:00
parent b89ae69202
commit 6d4085f5f0
3 changed files with 25 additions and 1 deletions

View file

@ -177,7 +177,7 @@ const sendClientReady = (isReconnect) => {
}
let token = Cookies.get('token');
if (token == null) {
if (token == null || !padutils.isValidAuthorToken(token)) {
token = padutils.generateAuthorToken();
Cookies.set('token', token, {expires: 60});
}