1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-21 21:09:22 +00:00

Updated project dependencies

This commit is contained in:
Pierre HUBERT 2024-01-05 09:57:37 +01:00
parent aebc697715
commit 087e1b2070
10 changed files with 811 additions and 857 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/target
config.private.yaml
storage
.idea

3
.idea/.gitignore vendored
View File

@ -1,3 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -1,8 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="pierre">
<words>
<w>comunic</w>
<w>forez</w>
</words>
</dictionary>
</component>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/comunic_server.iml" filepath="$PROJECT_DIR$/comunic_server.iml" />
</modules>
</component>
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

1571
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -9,38 +9,38 @@ edition = "2018"
[dependencies]
yaml-rust = "0.4.5"
mysql = "24.0.0"
actix = "0.13.0"
actix-web = "4.3.1"
actix = "0.13.1"
actix-web = "4.4.0"
actix-files = "0.6.2"
actix-multipart = "0.6.0"
actix-multipart = "0.6.1"
actix-web-actors = "4.2.0"
actix-http = "3.3.1"
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.96"
futures = "0.3.28"
encoding_rs = "0.8.32"
percent-encoding = "2.2.0"
mailchecker = "5.0.9"
sha1 = "0.10.5"
serde_json = "1.0.108"
futures = "0.3.29"
encoding_rs = "0.8.33"
percent-encoding = "2.3.1"
mailchecker = "6.0.1"
sha1 = "0.10.6"
rand = "0.8.5"
chrono = "0.4.19"
bytes = "1.2.1"
image = "0.24.3"
chrono = "0.4.31"
bytes = "1.5.0"
image = "0.24.7"
kamadak-exif = "0.5.4"
lazy_static = "1.4.0"
mime_guess = "2.0.4"
pdf = "0.8.1"
regex = "1.6.0"
dashmap = "5.3.4"
reqwest = { version = "0.11.11", features = ["json"] }
pdf = "0.9.0"
regex = "1.10.2"
dashmap = "5.5.3"
reqwest = { version = "0.11.23", features = ["json"] }
webrtc-sdp = "0.3.9"
bcrypt = "0.14.0"
bcrypt = "0.15.0"
mp3-metadata = "0.3.4"
mp4 = "0.13.0"
mp4 = "0.14.0"
zip = "0.6.2"
webpage = "1.4.0"
webpage = "2.0.0"
gouth = "0.2.1"
webauthn-rs = "0.4.3"
url = "2.2.2"
async-recursion = "1.0.0"
tokio = { version = "1.20.1", features = ["rt-multi-thread"] }
url = "2.5.0"
async-recursion = "1.0.5"
tokio = { version = "1.35.0", features = ["rt-multi-thread"] }

View File

@ -11,11 +11,11 @@ use crate::data::error::{ExecError, ResultBoxError};
pub fn is_valid_pdf(file: &actix_web::web::Bytes) -> ResultBoxError<bool> {
let backend = file.to_vec();
let mut pdf_file = FileOptions::cached().load(backend.as_slice())?;
let pdf_file = FileOptions::cached().load(backend.as_slice())?;
let start_offset = backend.locate_start_offset()?;
match backend.read_xref_table_and_trailer(start_offset, &mut pdf_file) {
let valid = match backend.read_xref_table_and_trailer(start_offset, &pdf_file.resolver()) {
Ok((refs, _)) => {
if refs.is_empty() {
Err(ExecError::boxed_string(format!(
@ -31,5 +31,7 @@ pub fn is_valid_pdf(file: &actix_web::web::Bytes) -> ResultBoxError<bool> {
println!("Error while parsing PDF: {:?}", e);
Ok(false)
}
}
};
Ok(valid?)
}

View File

@ -11,13 +11,12 @@ use crate::data::post::PostWebLink;
/// Attempt to get information about a URL given by a user
pub fn get_post_web_link(url: &str) -> Res<PostWebLink> {
let options = WebpageOptions {
allow_insecure: false,
follow_location: false,
max_redirections: 0,
timeout: Duration::from_secs(3),
useragent: "OpenGraph Fetcher v1.0".to_string(),
};
let mut options = WebpageOptions::default();
options.allow_insecure = false;
options.follow_location = false;
options.max_redirections = 0;
options.timeout = Duration::from_secs(3);
options.useragent = "OpenGraph Fetcher v1.0".to_string();
let page = Webpage::from_url(url, options)?;