diff --git a/server/src/web-templates/admin-pages.tsx b/server/src/web-templates/admin-pages.tsx
index 188832c..be67c9e 100644
--- a/server/src/web-templates/admin-pages.tsx
+++ b/server/src/web-templates/admin-pages.tsx
@@ -1318,7 +1318,7 @@ export function CameraEditPage(props: CameraEditProps) {
| {s.role} |
{s.name} |
- {s.rtsp_uri} |
+ {maskRtspPassword(s.rtsp_uri)} |
))}
@@ -2846,6 +2846,10 @@ function parseRtspUrl(url: string): { host: string; port: string; path: string;
};
}
+function maskRtspPassword(uri: string): string {
+ return uri.replace(/(rtsp:\/\/[^:]+:)([^@]+)(@)/, "$1**********$3");
+}
+
function formatTime(iso: string): string {
try {
const d = new Date(iso);