mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-08 21:24:56 -05:00
allow specifying username with empty password
Reolink cameras ship with username "admin", password "", so this is necessary to use them fresh out of the box.
This commit is contained in:
@@ -296,7 +296,11 @@ impl Opener for RetinaOpener {
|
||||
let creds = match (username, password) {
|
||||
(None, None) => None,
|
||||
(Some(username), Some(password)) => Some(Credentials { username, password }),
|
||||
_ => bail!("expected username and password together"),
|
||||
(Some(username), None) => Some(Credentials {
|
||||
username,
|
||||
password: String::new(),
|
||||
}),
|
||||
_ => bail!("must supply username when supplying password"),
|
||||
};
|
||||
|
||||
// TODO: connection timeout.
|
||||
|
||||
Reference in New Issue
Block a user