Race condition in BungeeCord implemetnation
A248 opened this issue ยท 0 comments
The use of getPlayer()
in BungeePlayer is unsound. It is possible for getPlayer()
to return null, but the code in BungeePlayer does not account for this.
For example:
It does not matter whether the caller checks any preconditions (such as isOnline()). The code would still be vulnerable to a race condition. Take the following situation:
- Caller checks BungeePlayer#isOnline; isOnline() returns true
- The player represented by BungeePlayer disconnects from the proxy
- Caller calls BungeePlayer#hasPermission
- A NPE is thrown