Fix SMB negotiate: cipher_count=1 and username case sensitivity
This commit is contained in:
Vendored
+4
-3
@@ -75,9 +75,10 @@ impl Share {
|
||||
}
|
||||
|
||||
/// Grant `access` to the given (already-registered) user. Multiple calls
|
||||
/// accumulate.
|
||||
/// accumulate. Username is normalized to lowercase for SMB case-insensitive
|
||||
/// matching.
|
||||
pub fn user(mut self, name: impl Into<String>, access: Access) -> Self {
|
||||
self.users.insert(name.into(), access);
|
||||
self.users.insert(name.into().to_lowercase(), access);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -163,7 +164,7 @@ impl SmbServerBuilder {
|
||||
}
|
||||
|
||||
pub fn user(mut self, name: impl Into<String>, password: impl Into<String>) -> Self {
|
||||
let n = name.into();
|
||||
let n = name.into().to_lowercase();
|
||||
if !self.users.contains_key(&n) {
|
||||
self.user_order.push(n.clone());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user