memorable download codes
This commit is contained in:
parent
511bd741dd
commit
86bdac20af
7 changed files with 31 additions and 10 deletions
|
@ -1,7 +1,6 @@
|
|||
mod download;
|
||||
mod store;
|
||||
mod upload;
|
||||
mod util;
|
||||
mod zip;
|
||||
|
||||
use std::{fs::File, path::PathBuf};
|
||||
|
@ -25,7 +24,7 @@ async fn handle_download(
|
|||
data: AppData,
|
||||
) -> actix_web::Result<HttpResponse> {
|
||||
let file_code = path.into_inner();
|
||||
if !util::is_ascii_alphanumeric(&file_code) {
|
||||
if !store::is_valid_storage_code(&file_code) {
|
||||
return Ok(HttpResponse::NotFound().finish());
|
||||
}
|
||||
let data = data.read().await;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue