Backport secret chat security fix