RakLib
RakLib copied to clipboard
Cookie data
Im not completely sure of the code i wrote. Please add/subtract and report my mistakes. We need to update this
I think an Exception should be added to Cookie.php line 46 and i want to add the serverHasSecurity variable to pocketmine.yml or server.properties
What to do in Cookie.php line 51
also this seems to be a memory leak if you never clean up the data. but this should be handled by the server instead; RakLib implements the protocol, not the server to handle the protocol.
Suggestion for OpenConnReq2 class How can I access Cookie in OpenConnReq2.php
They say ServerAddress is 7 bytes but look at this
MessageIdentifiers.php
remoteBindingAddress(6 bytes)
To avoid having to store all the cookies, I was wondering if it wasn't possible to use a predictable string based on the address and a server secret generated at start-up?
Smth like a hash but for int ?
To avoid having to store all the cookies, I was wondering if it wasn't possible to use a predictable string based on the address and a server secret generated at start-up?
Smth like a hash but for int ?
I previously considered this. I don't think a static secret for the whole server runtime is wise (attackers could collect cookies and reuse them), but we could have the secret periodically rotated (similar to how GS4 Query operates in PM).
A mechanism like that might be problematic for proxies, though, since they don't see the real IP of the client.
@dktapps why would proxies be a problem? unless some packets are not sent through the proxy
because proxy sees only 1 IP address for all clients
@dktapps why would proxies be a problem? unless some packets are not sent through the proxy
Why is this PR closed?
because proxy sees only 1 IP address for all clients
@dktapps why would proxies be a problem? unless some packets are not sent through the proxy
I'd say it's the responsibility of the proxy to override the cookie field.
Why is this PR closed?
I couldn't find any solution.
it is better for security that the cookie feature is always on
Closed due to lack of activity.