Skip to content

Commit

Permalink
bump dependencies to reduce cargo audit warnings, bump version to 0.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkjall committed Jul 9, 2023
1 parent 38ee45c commit 491cdd7
Show file tree
Hide file tree
Showing 9 changed files with 741 additions and 667 deletions.
1,315 changes: 691 additions & 624 deletions Cargo.lock

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "ripasso"
description = "A password manager that uses the file format of the standard unix password manager 'pass'"
repository = "https://github.com/cortex/ripasso/"
keywords = ["password-manager", "pass"]
version = "0.6.4"
version = "0.6.5"
authors = ["Joakim Lundborg <joakim.lundborg@gmail.com", "Alexander Kjäll <alexander.kjall@gmail.com>"]
license = "GPL-3.0-only"
edition = '2021'
Expand All @@ -12,19 +12,19 @@ edition = '2021'
glob = "0.3.0"
gpgme = "0.11.0"
chrono = "0.4"
git2 = "0.16.0"
git2 = "0.17.2"
rand = "0.8.5"
whoami = "1.2.3"
toml = "0.5.9"
reqwest = { version = "0.11.12", features = ["blocking"] }
whoami = "1.4.1"
toml = "0.7.6"
reqwest = { version = "0.11.18", features = ["blocking"] }
hex = "0.4.3"
totp-rs = { version = "3.1.0", features = ["otpauth"] }
sequoia-openpgp = "1.13.0"
anyhow = "1.0.66"
sequoia-ipc = "0.28.0"
base64 = "0.21.0"
totp-rs = { version = "5.0.2", features = ["otpauth"] }
sequoia-openpgp = "1.16.0"
anyhow = "1.0.71"
sequoia-ipc = "0.30.1"
base64 = "0.21.2"
sha1 = "0.10.5"
sha2 = "0.10.6"
sha2 = "0.10.7"
hmac = "0.12.1"

[dependencies.config]
Expand All @@ -33,10 +33,10 @@ default-features = false
features = ["toml"]

[dev-dependencies]
tempfile = "3.4.0"
flate2 = "1.0.22"
tempfile = "3.6.0"
flate2 = "1.0.26"
tar = "0.4.38"
criterion = "0.3.5"
criterion = "0.5.1"

[workspace]

Expand Down
12 changes: 6 additions & 6 deletions cursive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ description = "A password manager that uses the file format of the standard unix
repository = "https://github.com/cortex/ripasso/"
keywords = ["password-manager", "pass"]
categories = ["command-line-utilities"]
version = "0.6.4"
version = "0.6.5"
authors = ["Joakim Lundborg <joakim.lundborg@gmail.com>", "Alexander Kjäll <alexander.kjall@gmail.com>"]
license = "GPL-3.0-only"
edition = '2021'
build = "build.rs"

[dependencies]
cursive = { version = "0.20.0", default-features = false, features = ["toml", "crossterm-backend"]}
ripasso = { path = "../", version = "0.6.4" }
ripasso = { path = "../", version = "0.6.5" }
locale_config = "0.3.0"
unic-langid = "0.9.1"
gettext = "0.4.0"
lazy_static = "1.4.0"
toml = "0.5.9"
term_size = "0.3.2"
toml = "0.7.6"
terminal_size = "0.2.6"
hex = "0.4.3"

[target."cfg(target_os = \"linux\")".dependencies.wl-clipboard-rs]
Expand All @@ -35,9 +35,9 @@ default-features = false
features = ["toml"]

[dev-dependencies]
tempfile = "3.4.0"
tempfile = "3.6.0"
chrono = "0.4"

[build-dependencies]
glob = "0.3.0"
glob = "0.3.1"
man = "0.3.0"
8 changes: 4 additions & 4 deletions cursive/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#[cfg(not(target_os = "linux"))]
use cli_clipboard::ClipboardProvider;
#[cfg(target_os = "linux")]
use clipboard::ClipboardProvider;
use cursive::{
event::Key,
views::{Checkbox, Dialog, EditView, OnEventView, RadioButton, TextView},
Expand All @@ -24,10 +28,6 @@ use pass::Result;
use ripasso::{crypto::CryptoImpl, pass};
#[cfg(target_os = "linux")]
use wl_clipboard_rs::copy::{MimeType, Options, Source};
#[cfg(target_os = "linux")]
use clipboard::ClipboardProvider;
#[cfg(not(target_os = "linux"))]
use cli_clipboard::ClipboardProvider;

/// Displays an error in a cursive dialog
pub fn errorbox(ui: &mut Cursive, err: &pass::Error) {
Expand Down
5 changes: 3 additions & 2 deletions cursive/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ type StoreListType = Arc<Mutex<Vec<Arc<Mutex<PasswordStore>>>>>;

lazy_static! {
static ref CATALOG: gettext::Catalog = get_translation_catalog();
static ref DEFAULT_TERMINAL_SIZE: (usize, usize) = match term_size::dimensions() {
Some((w, h)) => (w + 8, h),
static ref DEFAULT_TERMINAL_SIZE: (usize, usize) = match terminal_size::terminal_size() {
Some((terminal_size::Width(w), terminal_size::Height(h))) =>
(usize::from(w + 8), usize::from(h)),
_ => (0, 0),
};
}
Expand Down
4 changes: 2 additions & 2 deletions gtk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "ripasso-gtk"
version = "0.6.4"
version = "0.6.5"
authors = ["Joakim Lundborg <joakim.lundborg@gmail.com>"]
edition = '2021'

[dependencies]
ripasso = { path = "../", version = "0.6.4" }
ripasso = { path = "../", version = "0.6.5" }
gtk = { version = "0.15.5", features = ["v3_22"] }
gdk = "0.15.4"
glib = "0.15.12"
Expand Down
4 changes: 2 additions & 2 deletions qml/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "ripasso-qt"
version = "0.6.4"
version = "0.6.5"
authors = ["Joakim Lundborg <joakim.lundborg@gmail.com>"]
edition = '2021'

[dependencies]
clipboard = "0.5"
ripasso = { path = "../", version = "0.6.4" }
ripasso = { path = "../", version = "0.6.5" }
qml = { git = "https://github.com/White-Oak/qml-rust" }
2 changes: 1 addition & 1 deletion src/pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ impl PasswordEntry {
}
end_pos
};
let totp = TOTP::<&str>::from_url(&secret[start_pos..end_pos])?;
let totp = TOTP::from_url(&secret[start_pos..end_pos])?;
Ok(totp.generate_current()?)
} else {
Err(Error::Generic("No otpauth:// url in secret"))
Expand Down
30 changes: 18 additions & 12 deletions src/tests/pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ fn read_config_default_path_in_env_var_with_pgp_setting() -> Result<()> {

writeln!(
&file,
"[stores.default]\npath = \"{}\"\nvalid_signing_keys = \"7E068070D5EF794B00C8A9D91D108E6C07CBC406\"\npgp_implementation = 'gpg'\nown_fingerprint = \"7E068070D5EF794B00C8A9D91D108E6C07CBC406\"",
"[stores.default]\npath = \"{}\"\nvalid_signing_keys = \"7E068070D5EF794B00C8A9D91D108E6C07CBC406\"\npgp_implementation = \"gpg\"\nown_fingerprint = \"7E068070D5EF794B00C8A9D91D108E6C07CBC406\"",
dir.path().join(".password-store").to_str().unwrap()
)?;
file.flush()?;
Expand Down Expand Up @@ -797,10 +797,13 @@ fn save_config_one_store() {
let config = std::fs::read_to_string(config_file.path()).unwrap();

assert!(config.contains("[stores.\"s1 name\"]\n"));
assert!(config.contains(&format!("path = '{}'\n", passdir.path().display())));
assert!(config.contains(&format!("style_path = '{}'\n", style_file.path().display())));
assert!(config.contains("pgp_implementation = 'sequoia'\n"));
assert!(config.contains("own_fingerprint = '0000000000000000000000000000000000000000'\n"));
assert!(config.contains(&format!("path = \"{}\"\n", passdir.path().display())));
assert!(config.contains(&format!(
"style_path = \"{}\"\n",
style_file.path().display()
)));
assert!(config.contains("pgp_implementation = \"sequoia\"\n"));
assert!(config.contains("own_fingerprint = \"0000000000000000000000000000000000000000\"\n"));
}

#[test]
Expand All @@ -827,8 +830,8 @@ fn save_config_one_store_with_pgp_impl() {
let data = fs::read_to_string(dir.path().join("file.toml")).unwrap();

assert!(data.contains("[stores.default]"));
assert!(data.contains("pgp_implementation = 'gpg'"));
assert!(data.contains(&format!("path = '{}'\n", &dir.path().display())));
assert!(data.contains("pgp_implementation = \"gpg\""));
assert!(data.contains(&format!("path = \"{}\"\n", &dir.path().display())));
}

#[test]
Expand All @@ -855,9 +858,9 @@ fn save_config_one_store_with_fingerprint() {
let data = fs::read_to_string(dir.path().join("file.toml")).unwrap();

assert!(data.contains("[stores.default]"));
assert!(data.contains("pgp_implementation = 'sequoia'"));
assert!(data.contains("own_fingerprint = '7E068070D5EF794B00C8A9D91D108E6C07CBC406'"));
assert!(data.contains(&format!("path = '{}'\n", &dir.path().display())));
assert!(data.contains("pgp_implementation = \"sequoia\""));
assert!(data.contains("own_fingerprint = \"7E068070D5EF794B00C8A9D91D108E6C07CBC406\""));
assert!(data.contains(&format!("path = \"{}\"\n", &dir.path().display())));
}

#[test]
Expand Down Expand Up @@ -1486,8 +1489,11 @@ fn test_format_error() {
"configuration is frozen"
);
assert_eq!(
format!("{}", Error::from(toml::ser::Error::DateInvalid)),
"a serialized date was invalid"
format!(
"{}",
Error::from(toml::ser::to_string_pretty(&None::<String>).err().unwrap())
),
"unsupported None value"
);
assert_eq!(
format!("{}", Error::from("custom error message")),
Expand Down

0 comments on commit 491cdd7

Please sign in to comment.