mirror of
https://github.com/videolan/vlc-android
synced 2024-11-23 09:56:36 +08:00
Remote access: purge websockets tickets when expired
This commit is contained in:
parent
5d76c6f532
commit
6cabd96456
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user