server: Upgrade ldap3_proto
This commit is contained in:
committed by
nitnelave
parent
99ed6eface
commit
1598f096e9
48
Cargo.lock
generated
48
Cargo.lock
generated
@@ -385,7 +385,7 @@ dependencies = [
|
|||||||
"asn1-rs-derive",
|
"asn1-rs-derive",
|
||||||
"asn1-rs-impl",
|
"asn1-rs-impl",
|
||||||
"displaydoc 0.2.3",
|
"displaydoc 0.2.3",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"rusticata-macros",
|
"rusticata-macros",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
@@ -842,7 +842,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "1ff76b51e4c068c52bfd2866e1567bee7c567ae8f24ada09fd4307019e25eab7"
|
checksum = "1ff76b51e4c068c52bfd2866e1567bee7c567ae8f24ada09fd4307019e25eab7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1077,7 +1077,7 @@ checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"asn1-rs",
|
"asn1-rs",
|
||||||
"displaydoc 0.2.3",
|
"displaydoc 0.2.3",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"num-bigint",
|
"num-bigint",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"rusticata-macros",
|
"rusticata-macros",
|
||||||
@@ -2265,24 +2265,13 @@ dependencies = [
|
|||||||
"spin 0.5.2",
|
"spin 0.5.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lber"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8a99b520993b21a6faab32643cf4726573dc18ca4cf2d48cbeb24d248c86c930"
|
|
||||||
dependencies = [
|
|
||||||
"byteorder",
|
|
||||||
"bytes",
|
|
||||||
"nom 2.2.1",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lber"
|
name = "lber"
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
source = "git+https://github.com/inejge/ldap3/#11a66fd5c3df6ee2bae1237b93ba650a597f7805"
|
source = "git+https://github.com/inejge/ldap3/#11a66fd5c3df6ee2bae1237b93ba650a597f7805"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2296,9 +2285,9 @@ dependencies = [
|
|||||||
"futures",
|
"futures",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"lber 0.4.1",
|
"lber",
|
||||||
"log",
|
"log",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"ring",
|
"ring",
|
||||||
"rustls",
|
"rustls",
|
||||||
@@ -2314,13 +2303,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ldap3_proto"
|
name = "ldap3_proto"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4162706b6f3b3d58f577990e22e9a0e03e2f9bedc2b8181d8abab2498da32003"
|
checksum = "db993ebb4a1acda7ac25fa7e8609cff225a65f1f4a668e378eb252a1a6de433a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"base64 0.21.0",
|
||||||
"bytes",
|
"bytes",
|
||||||
"lber 0.3.0",
|
"lber",
|
||||||
|
"nom",
|
||||||
"peg",
|
"peg",
|
||||||
|
"thiserror",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"tracing",
|
"tracing",
|
||||||
"uuid 1.3.1",
|
"uuid 1.3.1",
|
||||||
@@ -2342,7 +2334,7 @@ dependencies = [
|
|||||||
"httpdate",
|
"httpdate",
|
||||||
"idna 0.3.0",
|
"idna 0.3.0",
|
||||||
"mime",
|
"mime",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"quoted_printable",
|
"quoted_printable",
|
||||||
"rustls",
|
"rustls",
|
||||||
@@ -2431,7 +2423,7 @@ dependencies = [
|
|||||||
"itertools",
|
"itertools",
|
||||||
"juniper",
|
"juniper",
|
||||||
"jwt 0.16.0",
|
"jwt 0.16.0",
|
||||||
"lber 0.4.1",
|
"lber",
|
||||||
"ldap3",
|
"ldap3",
|
||||||
"ldap3_proto",
|
"ldap3_proto",
|
||||||
"lettre",
|
"lettre",
|
||||||
@@ -2710,12 +2702,6 @@ dependencies = [
|
|||||||
"static_assertions",
|
"static_assertions",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nom"
|
|
||||||
version = "2.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "cf51a729ecf40266a2368ad335a5fdde43471f545a967109cd62146ecf8b66ff"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nom"
|
name = "nom"
|
||||||
version = "7.1.3"
|
version = "7.1.3"
|
||||||
@@ -3465,7 +3451,7 @@ version = "4.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632"
|
checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3935,7 +3921,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e"
|
checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools",
|
"itertools",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"unicode_categories",
|
"unicode_categories",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -4885,7 +4871,7 @@ dependencies = [
|
|||||||
"data-encoding",
|
"data-encoding",
|
||||||
"der-parser",
|
"der-parser",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"nom 7.1.3",
|
"nom",
|
||||||
"oid-registry",
|
"oid-registry",
|
||||||
"rusticata-macros",
|
"rusticata-macros",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ itertools = "0.10"
|
|||||||
juniper = "0.15"
|
juniper = "0.15"
|
||||||
jwt = "0.16"
|
jwt = "0.16"
|
||||||
lber = "0.4.1"
|
lber = "0.4.1"
|
||||||
ldap3_proto = ">=0.3.1"
|
ldap3_proto = "^0.4"
|
||||||
log = "*"
|
log = "*"
|
||||||
orion = "0.17"
|
orion = "0.17"
|
||||||
rand_chacha = "0.3"
|
rand_chacha = "0.3"
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ impl ValueType for UserId {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
|
#[derive(PartialEq, Eq, Clone, Serialize, Deserialize)]
|
||||||
pub struct JpegPhoto(#[serde(with = "serde_bytes")] Vec<u8>);
|
pub struct JpegPhoto(#[serde(with = "serde_bytes")] Vec<u8>);
|
||||||
|
|
||||||
impl From<JpegPhoto> for Value {
|
impl From<JpegPhoto> for Value {
|
||||||
@@ -332,6 +332,19 @@ impl From<&JpegPhoto> for String {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Debug for JpegPhoto {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
let mut encoded = base64::engine::general_purpose::STANDARD.encode(&self.0);
|
||||||
|
if encoded.len() > 100 {
|
||||||
|
encoded.truncate(100);
|
||||||
|
encoded.push_str(" ...");
|
||||||
|
};
|
||||||
|
f.debug_tuple("JpegPhoto")
|
||||||
|
.field(&format!("b64[{}]", encoded))
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl JpegPhoto {
|
impl JpegPhoto {
|
||||||
pub fn is_empty(&self) -> bool {
|
pub fn is_empty(&self) -> bool {
|
||||||
self.0.is_empty()
|
self.0.is_empty()
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ where
|
|||||||
{
|
{
|
||||||
use tokio_stream::StreamExt;
|
use tokio_stream::StreamExt;
|
||||||
let (r, w) = tokio::io::split(stream);
|
let (r, w) = tokio::io::split(stream);
|
||||||
let mut requests = FramedRead::new(r, LdapCodec);
|
let mut requests = FramedRead::new(r, LdapCodec::default());
|
||||||
let mut resp = FramedWrite::new(w, LdapCodec);
|
let mut resp = FramedWrite::new(w, LdapCodec::default());
|
||||||
|
|
||||||
resp.send(LdapMsg {
|
resp.send(LdapMsg {
|
||||||
msgid: 0,
|
msgid: 0,
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ where
|
|||||||
use tokio_stream::StreamExt;
|
use tokio_stream::StreamExt;
|
||||||
let (r, w) = tokio::io::split(stream);
|
let (r, w) = tokio::io::split(stream);
|
||||||
// Configure the codec etc.
|
// Configure the codec etc.
|
||||||
let mut requests = FramedRead::new(r, LdapCodec);
|
let mut requests = FramedRead::new(r, LdapCodec::default());
|
||||||
let mut resp = FramedWrite::new(w, LdapCodec);
|
let mut resp = FramedWrite::new(w, LdapCodec::default());
|
||||||
|
|
||||||
let mut session = LdapHandler::new(
|
let mut session = LdapHandler::new(
|
||||||
AccessControlledBackendHandler::new(backend_handler),
|
AccessControlledBackendHandler::new(backend_handler),
|
||||||
|
|||||||
Reference in New Issue
Block a user