- 🐛 Fixed 500 error when instance has an invalid redirects config - Naz
View the changelogs for full details:
- Ghost - v4.17.0...v4.17.1
- Admin - TryGhost/Admin@v4.17.0...v4.17.1
Tag Name: v4.17.1
Release Date: 10/5/2021
GhostOpen-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.
This patch release fixes a critical bug that caused Ghost sites to return 500 errors across all routes when an invalid redirects configuration file was uploaded. The update adds validation for redirects configurations and ensures the site remains functional even when redirect rules contain invalid RegEx expressions. This is an important stability fix that prevents site-wide outages caused by malformed redirect configurations.
No migration steps are required for this update. The patch can be applied safely without any additional configuration changes.
This update is highly recommended for all Ghost installations, especially for sites that use custom redirects. The patch fixes a critical bug that could cause your entire site to return 500 errors if an invalid redirects configuration is uploaded.
Upgrading to v4.17.1 will prevent site-wide outages caused by malformed redirect rules and add validation to catch problematic configurations before they can impact your site.
Resolved a critical issue where Ghost sites would return 500 errors across all routes when an invalid redirects configuration file was uploaded. The problem was traced to a recent change in how redirect routers were mounted, which caused the entire site to fail when encountering invalid redirect rules.
The fix ensures that:
This fix prevents site-wide outages that could occur when administrators uploaded redirects files containing invalid RegEx expressions.
Added new validation logic to catch and prevent invalid RegEx expressions in redirects files when they are uploaded to the system. This proactive validation helps identify problematic redirect rules before they can cause site-wide issues.
No security fixes were included in this patch release.
No specific performance improvements were included in this patch release. The focus was on fixing the critical bug related to redirects configuration handling.
This patch release addresses a critical stability issue that could cause entire Ghost sites to become inaccessible (returning 500 errors) when administrators uploaded redirects configurations containing invalid RegEx expressions.
The fix improves system resilience by ensuring that the router declaration happens early in the process flow, preventing cascading failures when redirect rules contain errors. Additionally, new validation logic has been added to catch invalid RegEx expressions at upload time, preventing problematic configurations from entering the system in the first place.
This update is particularly important for sites that make frequent changes to their redirects configurations or that rely heavily on custom redirects for URL management. The improved error handling ensures that even if configuration errors occur, they won't result in site-wide outages.
View the changelogs for full details: