mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
SecurityManager: Restrict valid author token values
This commit is contained in:
parent
b89ae69202
commit
6d4085f5f0
3 changed files with 25 additions and 1 deletions
|
@ -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});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue