mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-24 06:05:55 -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:
parent
826b81a95c
commit
f904ba7a79
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user