Currently, the client assumes the server's public key is correct the first time they connect. This isn't a horrible assumption to make as in most cases it will be, but it leaves rooms for MITM attacks in specific scenarios.
The circumstances for this to be a problem are the following:
- the user has already created a server connected to the internet and already has data on it
- the user is connected to an untrustworthy network (such as a public wifi)
- the user is logging in on a device which never connected to the server
- the owners of the untrustworthy network are targeting specifically PMP
While this is unlikely to happen, it should still be fixed. There should be a human-readable version of the public key which the user should confirm.