Skip to content
Snippets Groups Projects
Commit 6cabd964 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Remote access: purge websockets tickets when expired

parent 5d76c6f5
No related branches found
No related tags found
1 merge request!2027Websockets
......@@ -316,7 +316,8 @@ object RemoteAccessWebSockets {
* @return true if the websocket message is allowed
*/
private fun verifyWebsocketAuth(incomingMessage: WSIncomingMessage?): Boolean {
return incomingMessage?.authTicket != null && tickets.firstOrNull { incomingMessage.authTicket == it.id && System.currentTimeMillis() < it.expiration } != null
tickets.removeIf { it.expiration < System.currentTimeMillis() }
return incomingMessage?.authTicket != null && tickets.firstOrNull { incomingMessage.authTicket == it.id } != null
}
private fun playbackControlAllowedOrSend(settings: SharedPreferences): Boolean {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment