-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Invalid username/password with password has "@" character #115
Comments
The "@" symbol has special meaning in the RTSP protocol. While it is not impossible to use it in a password on an IP camera, a lot of RSTP clients have issues with passwords containing "@". To be specific, the "@" symbol is used to signal to the RSTP server the end of the username/password string, and the beginning of the RSTP URI. |
IP camera password can use "@" symbol. I tried it on UNV, hikvision cameras. I can run stream with password with "@" character using vlc or ffmpeg. |
Depends on the implementation of the RTSP client. I am fairly new this this particular library, But for my day job I work for a security integrator and have personally designed and deployed the some of the largest IP CCTV systems in the country... The most common way I have seen software implement the RTSP protocol is to embed the username and password directly into the URI. This is why I typically tell my clients not to use the @ symbol in a password for an IP camera. Yes, most cameras will let you do this, but it tends to cause a lot of problems when software tries to connect to the camera and pull an RTSP stream, because the @ symbol is used as a delimiter between the username/password, and the rest of the URI for the RTSP connection request. I'll use an example of a Hanwha camera, that has a username of "admin" and a password of "password1", and an IP address of 192.168.1.100. (Hanwha's default IP) rtsp://admin:[email protected]/profile1/media.smp If the password has an @ in it, and the RTSP client chooses this connection method, you end up confusing the RTSP server because it thinks the password ends before the @. This is not a bug, rather a limitation of the "Basic Authentication" method in the RTSP protocol. As you noted with VLC, it is possible for some software to work around this, using "Digest Authentication" where the client passes a hash of the username and password to the RTSP server after the initial connection. I'd bet money that this project only supports basic authentication. Please note, I am just a user like your self, and am in no way affiliated with RtspClientSharp, and am looking at using this project to develop an AI analytic. That said, I am leaning towards using a different library now because this project looks like its abandoned. |
Maybe you can change the @ to -> %40 which would be the same |
Describe the bug
If password has "@" character like
abc@123@
. Exception occurred inConnectAsync
. Invalid Username/PasswordI checked in
NetworkCredential
, the correct password isabc@123@
Does anyone have any solution? THank you for helping!
This is my src code.
The text was updated successfully, but these errors were encountered: