Fixed a vulnerability that enabled the server to leak certain events over federation. Contributed by @eleboucher.