fix double encoding of passwords in camera wizard

This commit is contained in:
Josh Hawkins
2026-01-13 13:01:01 -06:00
parent 4b034644d2
commit 66bbe62ffb
2 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -81,7 +81,8 @@ export async function detectReolinkCamera(
export function maskUri(uri: string): string {
try {
// Handle RTSP URLs with user:pass@host format
const rtspMatch = uri.match(/rtsp:\/\/([^:]+):([^@]+)@(.+)/);
// Use greedy match for password to handle passwords with @
const rtspMatch = uri.match(/rtsp:\/\/([^:]+):(.+)@(.+)/);
if (rtspMatch) {
return `rtsp://${rtspMatch[1]}:${"*".repeat(4)}@${rtspMatch[3]}`;
}