app/models/user.rb in Mastodon prior to 3.5.0 allows a bypass of e-mail restrictions.
joinmastodon mastodon