mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-21 21:09:22 +00:00
Updated project dependencies
This commit is contained in:
parent
aebc697715
commit
087e1b2070
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/target
|
/target
|
||||||
config.private.yaml
|
config.private.yaml
|
||||||
storage
|
storage
|
||||||
|
.idea
|
||||||
|
3
.idea/.gitignore
vendored
3
.idea/.gitignore
vendored
@ -1,3 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
@ -1,8 +0,0 @@
|
|||||||
<component name="ProjectDictionaryState">
|
|
||||||
<dictionary name="pierre">
|
|
||||||
<words>
|
|
||||||
<w>comunic</w>
|
|
||||||
<w>forez</w>
|
|
||||||
</words>
|
|
||||||
</dictionary>
|
|
||||||
</component>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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
1571
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
44
Cargo.toml
44
Cargo.toml
@ -9,38 +9,38 @@ edition = "2018"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
yaml-rust = "0.4.5"
|
yaml-rust = "0.4.5"
|
||||||
mysql = "24.0.0"
|
mysql = "24.0.0"
|
||||||
actix = "0.13.0"
|
actix = "0.13.1"
|
||||||
actix-web = "4.3.1"
|
actix-web = "4.4.0"
|
||||||
actix-files = "0.6.2"
|
actix-files = "0.6.2"
|
||||||
actix-multipart = "0.6.0"
|
actix-multipart = "0.6.1"
|
||||||
actix-web-actors = "4.2.0"
|
actix-web-actors = "4.2.0"
|
||||||
actix-http = "3.3.1"
|
actix-http = "3.3.1"
|
||||||
serde = { version = "1.0.163", features = ["derive"] }
|
serde = { version = "1.0.163", features = ["derive"] }
|
||||||
serde_json = "1.0.96"
|
serde_json = "1.0.108"
|
||||||
futures = "0.3.28"
|
futures = "0.3.29"
|
||||||
encoding_rs = "0.8.32"
|
encoding_rs = "0.8.33"
|
||||||
percent-encoding = "2.2.0"
|
percent-encoding = "2.3.1"
|
||||||
mailchecker = "5.0.9"
|
mailchecker = "6.0.1"
|
||||||
sha1 = "0.10.5"
|
sha1 = "0.10.6"
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
chrono = "0.4.19"
|
chrono = "0.4.31"
|
||||||
bytes = "1.2.1"
|
bytes = "1.5.0"
|
||||||
image = "0.24.3"
|
image = "0.24.7"
|
||||||
kamadak-exif = "0.5.4"
|
kamadak-exif = "0.5.4"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
mime_guess = "2.0.4"
|
mime_guess = "2.0.4"
|
||||||
pdf = "0.8.1"
|
pdf = "0.9.0"
|
||||||
regex = "1.6.0"
|
regex = "1.10.2"
|
||||||
dashmap = "5.3.4"
|
dashmap = "5.5.3"
|
||||||
reqwest = { version = "0.11.11", features = ["json"] }
|
reqwest = { version = "0.11.23", features = ["json"] }
|
||||||
webrtc-sdp = "0.3.9"
|
webrtc-sdp = "0.3.9"
|
||||||
bcrypt = "0.14.0"
|
bcrypt = "0.15.0"
|
||||||
mp3-metadata = "0.3.4"
|
mp3-metadata = "0.3.4"
|
||||||
mp4 = "0.13.0"
|
mp4 = "0.14.0"
|
||||||
zip = "0.6.2"
|
zip = "0.6.2"
|
||||||
webpage = "1.4.0"
|
webpage = "2.0.0"
|
||||||
gouth = "0.2.1"
|
gouth = "0.2.1"
|
||||||
webauthn-rs = "0.4.3"
|
webauthn-rs = "0.4.3"
|
||||||
url = "2.2.2"
|
url = "2.5.0"
|
||||||
async-recursion = "1.0.0"
|
async-recursion = "1.0.5"
|
||||||
tokio = { version = "1.20.1", features = ["rt-multi-thread"] }
|
tokio = { version = "1.35.0", features = ["rt-multi-thread"] }
|
||||||
|
@ -11,11 +11,11 @@ use crate::data::error::{ExecError, ResultBoxError};
|
|||||||
pub fn is_valid_pdf(file: &actix_web::web::Bytes) -> ResultBoxError<bool> {
|
pub fn is_valid_pdf(file: &actix_web::web::Bytes) -> ResultBoxError<bool> {
|
||||||
let backend = file.to_vec();
|
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()?;
|
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, _)) => {
|
Ok((refs, _)) => {
|
||||||
if refs.is_empty() {
|
if refs.is_empty() {
|
||||||
Err(ExecError::boxed_string(format!(
|
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);
|
println!("Error while parsing PDF: {:?}", e);
|
||||||
Ok(false)
|
Ok(false)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
Ok(valid?)
|
||||||
}
|
}
|
||||||
|
@ -11,13 +11,12 @@ use crate::data::post::PostWebLink;
|
|||||||
|
|
||||||
/// Attempt to get information about a URL given by a user
|
/// Attempt to get information about a URL given by a user
|
||||||
pub fn get_post_web_link(url: &str) -> Res<PostWebLink> {
|
pub fn get_post_web_link(url: &str) -> Res<PostWebLink> {
|
||||||
let options = WebpageOptions {
|
let mut options = WebpageOptions::default();
|
||||||
allow_insecure: false,
|
options.allow_insecure = false;
|
||||||
follow_location: false,
|
options.follow_location = false;
|
||||||
max_redirections: 0,
|
options.max_redirections = 0;
|
||||||
timeout: Duration::from_secs(3),
|
options.timeout = Duration::from_secs(3);
|
||||||
useragent: "OpenGraph Fetcher v1.0".to_string(),
|
options.useragent = "OpenGraph Fetcher v1.0".to_string();
|
||||||
};
|
|
||||||
|
|
||||||
let page = Webpage::from_url(url, options)?;
|
let page = Webpage::from_url(url, options)?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user