Skip to content

Commit d272a4b

Browse files
committed
rebroadcast: fix basic auth
1 parent f8a8ed4 commit d272a4b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

common/src/rtsp-server.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ export class RtspClient extends RtspBase {
395395
hasGetParameter = true;
396396
contentBase: string;
397397

398-
constructor(public url: string) {
398+
constructor(public readonly url: string) {
399399
super();
400400
const u = new URL(url);
401401
const port = parseInt(u.port) || 554;
@@ -650,7 +650,8 @@ export class RtspClient extends RtspBase {
650650
const { parseHTTPHeadersQuotedKeyValueSet } = await import('http-auth-utils/dist/utils');
651651

652652
if (this.wwwAuthenticate.includes('Basic')) {
653-
const hash = BASIC.computeHash(url);
653+
const parsedUrl = new URL(this.url);
654+
const hash = BASIC.computeHash({ username: parsedUrl.username, password: parsedUrl.password });
654655
return `Basic ${hash}`;
655656
}
656657

plugins/prebuffer-mixin/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/prebuffer-mixin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scrypted/prebuffer-mixin",
3-
"version": "0.10.42",
3+
"version": "0.10.43",
44
"description": "Video Stream Rebroadcast, Prebuffer, and Management Plugin for Scrypted.",
55
"author": "Scrypted",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)