We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdca086 commit 3e9ff6bCopy full SHA for 3e9ff6b
src/Umbraco.Web.BackOffice/Controllers/PreviewController.cs
@@ -217,10 +217,8 @@ public ActionResult End(string? redir = null)
217
218
// are we attempting a redirect to the default route (by ID with optional culture)?
219
Match match = DefaultPreviewRedirectRegex().Match(redir ?? string.Empty);
220
- if (match.Success)
+ if (match.Success && int.TryParse(match.Groups["id"].Value, out int id))
221
{
222
- var id = int.Parse(match.Groups["id"].Value);
223
-
224
// first try to resolve the published URL
225
if (_umbracoContextAccessor.TryGetUmbracoContext(out IUmbracoContext? umbracoContext) &&
226
umbracoContext.Content is not null)
0 commit comments