Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release libunftp v0.19.0 #489

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

### libunftp 0.19.0

_tag: libunftp-0.19.0_

- [#471](https://github.com/bolcom/libunftp/pull/471) Added unFTP documentation link to help command output
- Include libunftp version in help command output
- [#470](https://github.com/bolcom/libunftp/pull/470) Fixed issue with modified datetime formatting for `Fileinfo` where old
dates didn't render correctly.
- [#482](https://github.com/bolcom/libunftp/pull/482) Fixed RUSTSEC-2023-0052
- Compile against Rust 1.72.0
- BREAKING: Upgrade to latest bitflags dependency. Bitflags are exposed in the API
for the TlsFlags option.
- Improved tests
- Upgraded dependencies

### unftp-sbe-gcs v0.2.3

- [#449](https://github.com/bolcom/libunftp/pull/449) GCS Backend has had a cleanup (deduplication, modularization)
Expand Down
32 changes: 16 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libunftp"
version = "0.18.9" # remember to update html_root_url
version = "0.19.0" # remember to update html_root_url
authors = [
"Agoston Horvath <[email protected]>",
"Dávid Kosztka <[email protected]>",
Expand Down Expand Up @@ -30,34 +30,34 @@ members = [
]

[dependencies]
async-trait = "0.1.68"
bitflags = "1.3.2"
bytes = "1.4.0"
chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] }
async-trait = "0.1.73"
bitflags = "2.4.0"
bytes = "1.5.0"
chrono = { version = "0.4.31", default-features = false, features = ["clock", "std"] }
derive_more = { version = "0.99.17", features = ["display"] }
futures-util = { version = "0.3.28", default-features = false, features = ["alloc", "sink"] }
getrandom = "0.2.9"
getrandom = "0.2.10"
lazy_static = "1.4.0"
md-5 = "0.10.5"
moka = { version = "0.9.7", default-features = false, features = ["sync"] }
moka = { version = "0.11.3", default-features = false, features = ["sync"] }
prometheus = { version = "0.13.3", default-features = false }
proxy-protocol = "0.5.0"
rustls = "0.21.6"
rustls-pemfile = "1.0.2"
rustls = "0.21.7"
rustls-pemfile = "1.0.3"
slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_info"] }
slog-stdlog = "4.1.1"
thiserror = "1.0.40"
tokio = { version = "1.28.2", features = ["macros", "rt", "net", "sync", "io-util", "time"] }
thiserror = "1.0.48"
tokio = { version = "1.32.0", features = ["macros", "rt", "net", "sync", "io-util", "time"] }
tokio-rustls = "0.24.1"
tokio-util = { version = "0.7.8", features = ["codec"] }
tracing = { version = "0.1.37", default-features = false }
tracing-attributes = "0.1.24"
uuid = { version = "1.3.3", features = ["v4"] }
tracing-attributes = "0.1.26"
uuid = { version = "1.4.1", features = ["v4"] }
x509-parser = "0.14.0"
dashmap = "5.4.0"
dashmap = "5.5.3"
libc = "0.2"

[dev-dependencies]
pretty_assertions = "1.3.0"
tokio = { version = "1.28.2", features = ["macros", "rt-multi-thread"] }
pretty_assertions = "1.4.0"
tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread"] }
unftp-sbe-fs = { path = "../libunftp/crates/unftp-sbe-fs"}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ add. Here we choose the [file system back-end](https://crates.io/crates/unftp-sb

```toml
[dependencies]
libunftp = "0.18.9"
libunftp = "0.19.0"
unftp-sbe-fs = "0.2"
tokio = { version = "1", features = ["full"] }
```
Expand Down
24 changes: 12 additions & 12 deletions crates/unftp-auth-jsonfile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ repository = "https://github.com/bolcom/libunftp/tree/master/crates/unftp-auth-j
readme = "README.md"

[dependencies]
async-trait = "0.1.68"
base64 = "0.13.1"
bytes = "1.4.0"
ipnet = "2.7.2"
async-trait = "0.1.73"
base64 = "0.21.4"
bytes = "1.5.0"
ipnet = "2.8.0"
iprange = "0.6.7"
libunftp = { version="0.18.9", path="../../"}
libunftp = { version="0.19.0", path="../../"}
ring = "0.16.20"
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.96"
tokio = { version = "1.28.2", features = ["rt", "time"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
tokio = { version = "1.32.0", features = ["rt", "time"] }
tracing = { version = "0.1.37", default-features = false }
tracing-attributes = "0.1.24"
tracing-attributes = "0.1.26"
valid = "0.3.1"
flate2 = "1.0.26"
flate2 = "1.0.27"

[dev-dependencies]
pretty_env_logger = "0.4.0"
tokio = { version = "1.28.2", features = ["macros"] }
pretty_env_logger = "0.5.0"
tokio = { version = "1.32.0", features = ["macros"] }
unftp-sbe-fs = { version="0.2.2", path="../unftp-sbe-fs"}
8 changes: 5 additions & 3 deletions crates/unftp-auth-jsonfile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
//!

use async_trait::async_trait;
use base64::Engine;
use bytes::Bytes;
use flate2::read::GzDecoder;
use ipnet::Ipv4Net;
Expand Down Expand Up @@ -229,7 +230,7 @@ impl JsonFileAuthenticator {
let mut b = Vec::new();
f.read_to_end(&mut b)?;
b.retain(|&x| x != b'\n' && x != b'\r');
gzdata = base64::decode(b)?;
gzdata = base64::engine::general_purpose::STANDARD.decode(b)?;
} else {
f.read_to_end(&mut gzdata)?;
}
Expand Down Expand Up @@ -279,11 +280,12 @@ impl JsonFileAuthenticator {
username.clone(),
UserCreds {
password: Password::Pbkdf2Password {
pbkdf2_salt: base64::decode(pbkdf2_salt)
pbkdf2_salt: base64::engine::general_purpose::STANDARD
.decode(pbkdf2_salt)
.map_err(|_| "Could not base64 decode the salt")?
.try_into()
.map_err(|_| "Could not convert String to Bytes")?,
pbkdf2_key: base64::decode(pbkdf2_key)
pbkdf2_key: base64::engine::general_purpose::STANDARD.decode(pbkdf2_key)
.map_err(|_| "Could not decode base64")?
.validate("pbkdf2_key", &Length::Max(SHA256_OUTPUT_LEN))
.result()
Expand Down
8 changes: 4 additions & 4 deletions crates/unftp-auth-pam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ repository = "https://github.com/bolcom/libunftp/tree/master/crates/unftp-auth-p
readme = "README.md"

[dependencies]
async-trait = "0.1.68"
libunftp = { version="0.18.9", path="../../"}
async-trait = "0.1.73"
libunftp = { version="0.19.0", path="../../"}
tracing = { version = "0.1.37", default-features = false }
tracing-attributes = "0.1.24"
tracing-attributes = "0.1.26"

[target.'cfg(target_family = "unix")'.dependencies]
pam-auth = { package = "pam", version = "0.7.0" }

[dev-dependencies]
tokio = { version = "1.28.2", features = ["macros"] }
tokio = { version = "1.32.0", features = ["macros"] }
22 changes: 11 additions & 11 deletions crates/unftp-auth-rest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ repository = "https://github.com/bolcom/libunftp/tree/hannes/crates/unftp-auth-r
readme = "README.md"

[dependencies]
async-trait = "0.1.68"
hyper = { version = "0.14.26", features = ["client", "runtime", "stream", "http1"] }
async-trait = "0.1.73"
hyper = { version = "0.14.27", features = ["client", "runtime", "stream", "http1"] }
hyper-rustls = "0.24.1"
libunftp = { version="0.18.9", path="../../"}
percent-encoding = "2.2.0"
regex = "1.8.3"
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.96"
tokio = { version = "1.28.2", features = ["rt", "net", "sync", "io-util", "time"] }
libunftp = { version="0.19.0", path="../../"}
percent-encoding = "2.3.0"
regex = "1.9.5"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
tokio = { version = "1.32.0", features = ["rt", "net", "sync", "io-util", "time"] }
tracing = { version = "0.1.37", default-features = false }
tracing-attributes = "0.1.24"
tracing-attributes = "0.1.26"


[dev-dependencies]
pretty_env_logger = "0.4.0"
tokio = { version = "1.28.2", features = ["macros"] }
pretty_env_logger = "0.5.0"
tokio = { version = "1.32.0", features = ["macros"] }
unftp-sbe-fs = { version="0.2.2", path="../unftp-sbe-fs"}
22 changes: 11 additions & 11 deletions crates/unftp-sbe-fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ repository = "https://github.com/bolcom/libunftp/tree/master/crates/unftp-sbe-fs
readme = "README.md"

[dependencies]
async-trait = "0.1.68"
async-trait = "0.1.73"
cfg-if = "1.0"
futures = { version = "0.3.28", default-features = false, features = ["std"] }
libunftp = { version="0.18.9", path="../../"}
libunftp = { version="0.19.0", path="../../"}
path_abs = "0.5.1"
tokio = { version = "1.28.2", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
tokio = { version = "1.32.0", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
tokio-stream = "0.1.14"
tracing = { version = "0.1.37", default-features = false }
tracing-attributes = "0.1.24"
tracing-attributes = "0.1.26"

[dev-dependencies]
async_ftp = "6.0.0"
more-asserts = "0.3.1"
pretty_assertions = "1.3.0"
pretty_env_logger = "0.4.0"
rstest = "0.18.1"
slog-async = "2.7.0"
pretty_assertions = "1.4.0"
pretty_env_logger = "0.5.0"
rstest = "0.18.2"
slog-async = "2.8.0"
slog-term = "2.9.0"
tempfile = "3.5.0"
tokio = { version = "1.28.2", features = ["macros", "rt-multi-thread"] }
tempfile = "3.8.0"
tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread"] }
tracing-subscriber = "0.3.17"
getrandom = "0.2.9"
getrandom = "0.2.10"
2 changes: 1 addition & 1 deletion crates/unftp-sbe-fs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Add the libunftp and tokio crates to your project's dependencies in `Cargo.toml`

```toml
[dependencies]
libunftp = "0.18.9"
libunftp = "0.19.0"
unftp-sbe-fs = "0.2.2"
tokio = { version = "1", features = ["full"] }
```
Expand Down
34 changes: 17 additions & 17 deletions crates/unftp-sbe-gcs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ repository = "https://github.com/bolcom/libunftp/tree/master/crates/unftp-sbe-gc
readme = "README.md"

[dependencies]
async-trait = "0.1.68"
base64 = "0.13.1"
bytes = "1.4.0"
chrono = { version = "0.4.26", default-features = false, features = ["std", "serde"] }
async-trait = "0.1.73"
base64 = "0.21.4"
bytes = "1.5.0"
chrono = { version = "0.4.31", default-features = false, features = ["std", "serde"] }
futures = { version = "0.3.28", default-features = false, features = ["std"] }
hyper = { version = "0.14.26", features = ["client", "runtime", "stream", "http1"] }
hyper = { version = "0.14.27", features = ["client", "runtime", "stream", "http1"] }
hyper-rustls = "0.24.1"
libunftp = { version="0.18.9", path="../../"}
libunftp = { version="0.19.0", path="../../"}
mime = "0.3.17"
percent-encoding = "2.2.0"
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.96"
time = "0.3.21"
tokio = { version = "1.28.2", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
percent-encoding = "2.3.0"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
time = "0.3.28"
tokio = { version = "1.32.0", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
tokio-stream = "0.1.14"
tokio-util = { version = "0.7.8", features = ["codec", "compat"] }
tracing = { version = "0.1.37", default-features = false }
tracing-attributes = "0.1.24"
tracing-attributes = "0.1.26"
yup-oauth2 = "8.3.0"

[dev-dependencies]
Expand All @@ -44,12 +44,12 @@ clap = { version = "3.2.25", features = ["env"] }
lazy_static = "1.4.0"
more-asserts = "0.3.1"
path_abs = "0.5.1"
pretty_assertions = "1.3.0"
pretty_env_logger = "0.4.0"
pretty_assertions = "1.4.0"
pretty_env_logger = "0.5.0"
slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_info"] }
slog-async = "2.7.0"
slog-async = "2.8.0"
slog-stdlog = "4.1.1"
slog-term = "2.9.0"
tempfile = "3.5.0"
tokio = { version = "1.28.2", features = ["macros", "rt-multi-thread"] }
tempfile = "3.8.0"
tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread"] }
tracing-subscriber = "0.3.17"
2 changes: 1 addition & 1 deletion crates/unftp-sbe-gcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Add the needed dependencies to Cargo.toml:

```toml
[dependencies]
libunftp = "0.18.9"
libunftp = "0.19.0"
unftp-sbe-gcs = "0.2.3"
tokio = { version = "1", features = ["full"] }
```
Expand Down
2 changes: 1 addition & 1 deletion crates/unftp-sbe-gcs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//!
//! ```toml
//! [dependencies]
//! libunftp = "0.18.9"
//! libunftp = "0.19.0"
//! unftp-sbe-gcs = "0.2.3"
//! tokio = { version = "1", features = ["full"] }
//! ```
Expand Down
5 changes: 4 additions & 1 deletion crates/unftp-sbe-gcs/src/response_body.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::ObjectMetadata;
use base64::Engine;
use chrono::prelude::*;
use libunftp::storage::{Error, ErrorKind, Fileinfo};
use serde::{de, Deserialize};
Expand Down Expand Up @@ -128,7 +129,9 @@ impl Item {
}

pub(crate) fn to_md5(&self) -> Result<String, Error> {
let md5 = base64::decode(&self.md5_hash).map_err(|e| Error::new(ErrorKind::LocalError, e))?;
let md5 = base64::engine::general_purpose::STANDARD
.decode(&self.md5_hash)
.map_err(|e| Error::new(ErrorKind::LocalError, e))?;
Ok(md5.iter().map(|b| format!("{:02x}", b)).collect())
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![deny(clippy::all)]
#![deny(missing_docs)]
#![forbid(unsafe_code)]
#![doc(html_root_url = "https://docs.rs/libunftp/0.18.9")]
#![doc(html_root_url = "https://docs.rs/libunftp/0.19.0")]

//! libunftp is an extensible, async, cloud orientated FTP(S) server library.
//!
Expand All @@ -20,7 +20,7 @@
//!
//! ```toml
//! [dependencies]
//! libunftp = "0.18.9"
//! libunftp = "0.19.0"
//! unftp-sbe-fs = "0.2.0"
//! tokio = { version = "1", features = ["full"] }
//! ```
Expand Down
3 changes: 2 additions & 1 deletion src/server/ftpserver/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ impl Display for FtpsRequired {

bitflags! {
/// Used to configure TLS options employed for FTPS
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct TlsFlags: u32 {
/// Enables TLS version 1.2
const V1_2 = 0b00000001;
Expand All @@ -106,7 +107,7 @@ bitflags! {
/// Enables TLS session resumption via means tickets ([rfc5077](https://tools.ietf.org/html/rfc5077))
const RESUMPTION_TICKETS = 0b00010000;
/// Enables the latest safe TLS versions i.e. 1.2 and 1.3
const LATEST_VERSIONS = Self::V1_2.bits | Self::V1_3.bits;
const LATEST_VERSIONS = Self::V1_2.bits() | Self::V1_3.bits();
}
}

Expand Down
Loading