TL;DR
Ghost v4.11.0: Email Verification System & OAuth Login Feature Flag
This release introduces a new email verification system that helps prevent spam by limiting email sending capabilities until verification. It also adds a feature flag for OAuth login, improves performance with optimized middleware and member data queries, and enhances the email-cta card with button styling and segmentation support. Several code refactorings were completed to improve maintainability, particularly around the Members CSV Importer which has been extracted into a separate module.
Highlight of the Release
- New email verification system to prevent spam by limiting email sending until verification
- OAuth login feature flag added for future authentication options
- Performance improvements for theme middleware and member data queries
- Enhanced email-cta card with button styling and segmentation support
- Extraction of Members CSV Importer into a separate module
Migration Guide
No breaking changes were introduced in this release that require migration steps. The new features like OAuth login and members filtering are behind feature flags and won't affect existing functionality.
If you're using the Members CSV Importer programmatically (which is unlikely for most users), note that it has been extracted into a separate module following the dependency injection pattern. Review the implementation if you have custom code interacting with this component.
Upgrade Recommendations
This is a recommended upgrade for all Ghost users. The release includes important performance improvements, security enhancements with the email verification system, and foundational work for upcoming features.
The upgrade process should be straightforward with no breaking changes. As always, it's recommended to backup your database before upgrading.
Bug Fixes
Fixed Member Session API Response
Updated the session API status code for logged-out members from 4xx Unauthorized to 204 No Content, which is consistent with the status code returned when fetching member data while logged out.
Fixed Email-CTA Card Rendering
Fixed issues with the email-cta card:
- Fixed "undefined" appearing in email-cta cards when no content is provided
- Fixed error when rendering email-cta card with button and no contents
Fixed Import Error Handling
- Fixed empty response when import triggers a job
- Fixed error when hostLimits are undefined during imports
Fixed MemberCSVImporter Initialization
The membersApi variable could be in an uninitialized state. It now accesses through membersService getter to ensure it's always correctly referenced.
New Features
Email Verification System
A new email verification system has been implemented to prevent spam. This system limits email sending capabilities until the site owner verifies their email address. When imports exceed a certain threshold, emails are frozen until verification, and an escalation email is sent to verify the instance owner's email address.
OAuth Login Feature Flag
Added a feature flag (oauthLogin) for OAuth authentication, laying groundwork for future social login options. This includes storage for OAuth user data to compare on future logins.
Segmented Email Content
Added support for segmented email content in previews and test emails. The email-cta card can now be segmented so only free or paid members see specific content, allowing authors to preview how this will appear in either case.
Members Filtering Alpha Flag
Added a membersFiltering alpha labs flag that will be used by the Admin interface for developing and testing upcoming members filtering features.
Security Updates
Email Sending Limits
Implemented a security measure that limits email sending capabilities until email verification is complete. This helps prevent the platform from being used for spam purposes by requiring verification before allowing unlimited email sending.
Email Freeze Persistence
Added email disabling flag to settings records to persist the email freeze state between instance restarts, ensuring that security measures remain in place even after server restarts.
Performance Improvements
Optimized Theme Middleware
Moved theme middleware after static middleware to reduce redundant API calls. The theme middleware makes several calls to the content API to populate global theme data for templates. By adding this middleware after the static theme files, redundant calls are eliminated.
Optimized Product Data Requests
Made a single request for products in theme middleware. Previously, the logic to populate both @price data and @products data made separate API requests for the same product data. This refactor removes the duplicate request, cutting database queries in half.
Reduced Member Identity Data Queries
Removed unused data queries for member identity. The request for fetching logged-in member data was making several extra DB queries to fetch data points not used on the frontend. This refactor cuts DB queries in half for fetching logged-in member data while maintaining necessary data for content gating.
Impact Summary
Ghost v4.11.0 focuses on improving security, performance, and developer experience. The new email verification system adds an important layer of protection against spam by limiting email sending capabilities until verification, which is particularly valuable for public Ghost installations.
Performance improvements to theme middleware and member data queries will result in faster page loads and API responses, especially for sites with many members. These optimizations reduce database load and improve overall system efficiency.
For content creators, the enhanced email-cta card with button styling and segmentation support provides more flexibility in email design and targeting. The ability to preview segmented content will help ensure emails look correct for different member segments.
The code refactoring, particularly around the Members CSV Importer, improves maintainability and follows modern development patterns. This will make future development easier and more robust.
Overall, this release represents a solid step forward in Ghost's evolution, with thoughtful improvements across security, performance, and user experience domains.
Full Release Notes
- 🐛 Fixed publication icon in nav bar sometimes appearing inverted in dark mode - Kevin Ansfield
🎨 GScan recently had a redesign so go and check it out! - https://gscan.ghost.org/ ✨
View the changelogs for full details: