bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
11.64k stars 1.47k forks source link

webrtc read (whep) username:password inline in url fails #1919

Closed saket424 closed 1 year ago

saket424 commented 1 year ago

Which version are you using?

v0.23.4

Which operating system are you using?

Describe the issue

whep not working when username:password specified inline with URL

Playing of this url in the browser https://username:password@example.io:8889/endpoint1 results in the following error

(index):112 error: TypeError: Failed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials: whep

Before whep, this webrtc scenario where url contains username:password worked fine in google chrome

Describe how to replicate the issue

  1. start the server
  2. publish with rtsp
  3. read with webrtc over whep using username:password

Did you attach the server logs?

yes (index):112 error: TypeError: Failed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials: whep

Did you attach a network dump?

no

Rashid567 commented 1 year ago

Same problem with v0.23.5.

Additional information: 1) If you reload page (via F5) - the username and password will remain in url and you will get the error in the browser console 2) If you reload page (via editing the URL) - the username and password disapear from the URL, but Authorization header appears and everything is fine

aler9 commented 1 year ago

Thanks for reporting the issue, this is fixed by #1966

aler9 commented 1 year ago

added in v0.23.6

github-actions[bot] commented 8 months ago

This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.