From 06808049fdc8de7a08b00aba63c8686343aec61e Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 15 Dec 2022 18:42:48 +0100 Subject: [PATCH] Trim whitespace for rtmp url to keep live restreams counter functional --- Pages/Dashboard.cshtml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pages/Dashboard.cshtml.cs b/Pages/Dashboard.cshtml.cs index 32d879d..043b669 100644 --- a/Pages/Dashboard.cshtml.cs +++ b/Pages/Dashboard.cshtml.cs @@ -44,7 +44,7 @@ public class DashboardModel : PageModel { } if (Request.Form["action"] == "restream_targets_set") { - var newtgts = Request.Form["value"].ToString(); + var newtgts = Request.Form["value"].ToString().Trim(); if (newtgts.Contains("localhost") || newtgts.Contains("127.0.0.1") || newtgts.Contains(user.StreamKey)) return; @@ -99,4 +99,4 @@ public class DashboardModel : PageModel { db.Update(user); } } -} \ No newline at end of file +}