Trim whitespace for rtmp url to keep live restreams counter functional

This commit is contained in:
Laura Hausmann 2022-12-15 18:42:48 +01:00
parent d7deaed412
commit 06808049fd
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -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);
}
}
}
}