Fix build after cargo update

* Fix project not building after `cargo update`

* Bump totp-rs from 3.x to 5.x

* Bump sea-orm to 0.10 to 0.11

* Remove `chrono` unused features to get rid of warning during `cargo audit`
This commit is contained in:
Cléo REBERT 2023-04-19 10:59:19 +02:00
parent 9a0d818b82
commit 86daf9f38e
No known key found for this signature in database
GPG key ID: 0FA097951CF65367
12 changed files with 1312 additions and 912 deletions

2168
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ version = "0.7.1"
anyhow = { version = "1.0", features = ["std"] }
async-trait = "0.1"
bytes = "1.3"
chrono = "0.4"
chrono = { version = "0.4", default_features = false }
futures = "0.3"
hex = "0.4"
mime_guess = { version = "2.0", default_features = false }
@ -18,7 +18,7 @@ poem = { version = "1.3.50", features = [
"anyhow",
"websocket",
] }
poem-openapi = { version = "2.0.21", features = [
poem-openapi = { version = "2.0", features = [
"swagger-ui",
"chrono",
"uuid",
@ -27,7 +27,7 @@ poem-openapi = { version = "2.0.21", features = [
russh-keys = { version = "0.37.1", features = ["openssl"] }
# russh-keys = { version = "0.23.0-beta.1", features = ["openssl"], path = "../../russh/russh-keys" }
rust-embed = "6.3"
sea-orm = { version = "0.10.6", features = [
sea-orm = { version = "0.11.2", features = [
"runtime-tokio-native-tls",
"macros",
], default-features = false }

View file

@ -9,7 +9,7 @@ anyhow = "1.0"
argon2 = "0.4"
async-trait = "0.1"
bytes = "1.3"
chrono = { version = "0.4", features = ["serde"] }
chrono = { version = "0.4", default_features = false, features = ["serde"] }
data-encoding = "2.3"
delegate = "0.6"
humantime-serde = "1.1"
@ -17,7 +17,7 @@ futures = "0.3"
once_cell = "1.17"
password-hash = "0.4"
poem = { version = "1.3.50", features = ["rustls"] }
poem-openapi = { version = "2.0.21", features = [
poem-openapi = { version = "2.0", features = [
"swagger-ui",
"chrono",
"uuid",
@ -26,7 +26,7 @@ poem-openapi = { version = "2.0.21", features = [
rand = "0.8"
rand_chacha = "0.3"
rand_core = { version = "0.6", features = ["std"] }
sea-orm = { version = "0.10.6", features = [
sea-orm = { version = "0.11.2", features = [
"runtime-tokio-native-tls",
"macros",
], default-features = false }
@ -34,7 +34,7 @@ serde = "1.0"
serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1.20", features = ["tracing"] }
totp-rs = { version = "3.0", features = ["otpauth"] }
totp-rs = { version = "5.0", features = ["otpauth"] }
tracing = "0.1"
tracing-core = "0.1"
url = "2.2"

View file

@ -18,7 +18,7 @@ pub fn generate_setup_url(key: &OtpSecretKey, label: &str) -> Secret<String> {
Secret::new(totp.get_url())
}
fn get_totp(key: &OtpSecretKey, label: Option<&str>) -> TOTP<OtpExposedSecretKey> {
fn get_totp(key: &OtpSecretKey, label: Option<&str>) -> TOTP {
TOTP {
algorithm: Algorithm::SHA1,
digits: 6,

View file

@ -13,7 +13,7 @@ anyhow = "1.0"
argon2 = "0.4"
async-trait = "0.1"
bytes = "1.3"
chrono = { version = "0.4", features = ["serde"] }
chrono = { version = "0.4", default_features = false, features = ["serde"] }
data-encoding = "2.3"
humantime-serde = "1.1"
futures = "0.3"
@ -21,7 +21,7 @@ once_cell = "1.17"
packet = "0.1"
password-hash = "0.4"
poem = { version = "1.3.50", features = ["rustls"] }
poem-openapi = { version = "2.0.21", features = [
poem-openapi = { version = "2.0", features = [
"swagger-ui",
"chrono",
"uuid",
@ -30,7 +30,7 @@ poem-openapi = { version = "2.0.21", features = [
rand = "0.8"
rand_chacha = "0.3"
rand_core = { version = "0.6", features = ["std"] }
sea-orm = { version = "0.10.6", features = [
sea-orm = { version = "0.11.2", features = [
"runtime-tokio-native-tls",
"macros",
], default-features = false }
@ -38,7 +38,7 @@ serde = "1.0"
serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1.20", features = ["tracing"] }
totp-rs = { version = "3.0", features = ["otpauth"] }
totp-rs = { version = "5.0", features = ["otpauth"] }
tracing = "0.1"
tracing-core = "0.1"
tracing-subscriber = "0.3"

View file

@ -5,9 +5,9 @@ name = "warpgate-db-entities"
version = "0.7.1"
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
poem-openapi = { version = "2.0.21", features = ["chrono", "uuid"] }
sea-orm = { version = "0.10.6", features = [
chrono = { version = "0.4", default_features = false, features = ["serde"] }
poem-openapi = { version = "2.0", features = ["chrono", "uuid"] }
sea-orm = { version = "0.11.2", features = [
"macros",
"with-chrono",
"with-uuid",

View file

@ -9,15 +9,15 @@ version = "0.7.1"
[dependencies]
async-std = { version = "^1.11", features = ["attributes"] }
chrono = "0.4"
sea-orm = { version = "0.10.6", features = [
chrono = { version = "0.4", default_features = false, features = ["serde"] }
sea-orm = { version = "0.11.2", features = [
"runtime-tokio-native-tls",
"macros",
"with-chrono",
"with-uuid",
"with-json",
], default-features = false }
sea-orm-migration = { version = "0.10.6", default-features = false, features = [
sea-orm-migration = { version = "0.11.2", default-features = false, features = [
"cli",
] }
uuid = { version = "1.2", features = ["v4", "serde"] }

View file

@ -7,7 +7,7 @@ version = "0.7.1"
[dependencies]
anyhow = "1.0"
async-trait = "0.1"
chrono = { version = "0.4", features = ["serde"] }
chrono = { version = "0.4", default_features = false, features = ["serde"] }
cookie = "0.16"
data-encoding = "2.3"
delegate = "0.6"
@ -23,7 +23,7 @@ poem = { version = "^1.3.50", features = [
"sse",
"embed",
] }
poem-openapi = { version = "2.0.21", features = ["swagger-ui"] }
poem-openapi = { version = "2.0", features = ["swagger-ui"] }
reqwest = { version = "0.11", features = ["rustls-tls-native-roots", "stream"] }
serde = "1.0"
serde_json = "1.0"

View file

@ -10,7 +10,7 @@ use http::header::HeaderName;
use http::uri::{Authority, Scheme};
use http::Uri;
use once_cell::sync::Lazy;
use poem::web::websocket::{CloseCode, Message, WebSocket};
use poem::web::websocket::{Message, WebSocket};
use poem::{Body, IntoResponse, Request, Response};
use tokio_tungstenite::{connect_async_with_config, tungstenite};
use tracing::*;
@ -414,7 +414,7 @@ async fn proxy_ws_inner(
client_sink
.send(tungstenite::Message::Close(data.map(|data| {
tungstenite::protocol::CloseFrame {
code: data.0.into(),
code: u16::from(data.0).into(),
reason: Cow::Owned(data.1),
}
})))
@ -444,7 +444,7 @@ async fn proxy_ws_inner(
tungstenite::Message::Close(data) => {
server_sink
.send(Message::Close(data.map(|data| {
(CloseCode::from(data.code), data.reason.into_owned())
(u16::from(data.code).into(), data.reason.into_owned())
})))
.await?;
}

View file

@ -16,7 +16,7 @@ russh = { version = "0.37.1", features = ["vendored-openssl"] }
# russh = { version = "0.35.0-beta.6", features = ["vendored-openssl"], path = "../../russh/russh"}
russh-keys = { version = "0.37.1", features = ["vendored-openssl"] }
# russh-keys = { version = "0.23.0-beta.1", features = ["vendored-openssl"], path = "../../russh/russh-keys" }
sea-orm = { version = "0.10.6", features = [
sea-orm = { version = "0.11.2", features = [
"runtime-tokio-native-tls",
], default-features = false }
thiserror = "1.0"

View file

@ -339,7 +339,7 @@ impl RemoteClient {
self.child_tasks.push(
tokio::task::Builder::new()
.name(&format!("SSH {} {:?} ops", self.id, id))
.spawn(session_channel.run()),
.spawn(session_channel.run()).unwrap(),
);
id
@ -524,7 +524,7 @@ impl RemoteClient {
self.child_tasks.push(
tokio::task::Builder::new()
.name(&format!("SSH {} {:?} ops", self.id, channel_id))
.spawn(channel.run()),
.spawn(channel.run()).unwrap(),
);
}
Ok(())
@ -554,7 +554,7 @@ impl RemoteClient {
self.child_tasks.push(
tokio::task::Builder::new()
.name(&format!("SSH {} {:?} ops", self.id, channel_id))
.spawn(channel.run()),
.spawn(channel.run()).unwrap(),
);
}
Ok(())

View file

@ -21,7 +21,7 @@ notify = "^5.0.0"
rcgen = { version = "0.10", features = ["zeroize"] }
serde_json = "1.0"
serde_yaml = "0.8.23"
sea-orm = { version = "0.10.6", default-features = false }
sea-orm = { version = "0.11.2", default-features = false }
time = "0.3"
tokio = { version = "1.20", features = ["tracing", "signal", "macros"] }
tracing = "0.1"