Skip to content

Commit

Permalink
bugfixes, security fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
overcuriousity committed Oct 24, 2024
1 parent 492ee5a commit 9cf96b2
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bitvault"
version = "1.1.2"
version = "1.1.3"
edition = "2021"
authors = ["Mario Stöckl <[email protected]>, originally Daniel Szabo <[email protected]> and contributors"]
license = "GPL-3"
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/auth_admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::args::{Args, ARGS};
use actix_web::{get, web, HttpResponse};
use askama::Template;


#[derive(Template)]
#[template(path = "auth_admin.html")]
struct AuthAdmin<'a> {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/auth_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::AppState;
use actix_web::{get, web, HttpResponse};
use askama::Template;


#[derive(Template)]
#[template(path = "auth_upload.html")]
struct AuthPasta<'a> {
Expand Down
4 changes: 1 addition & 3 deletions src/endpoints/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ use actix_multipart::Multipart;
use actix_web::error::ErrorBadRequest;
use actix_web::{get, web, Error, HttpResponse, Responder};
use askama::Template;

use bytesize::ByteSize;
use futures::TryStreamExt;
use log::warn;
use rand::Rng;
use std::io::Write;
use std::time::{SystemTime, UNIX_EPOCH};

fn field_name_matches(field_name: Option<&str>, expected: &str) -> bool {
field_name.map_or(false, |name| name == expected)
}

#[derive(Template)]
#[template(path = "index.html")]
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use crate::{AppState, Pasta, ARGS};
use actix_multipart::Multipart;
use actix_web::{get, post, web, Error, HttpResponse};
use askama::Template;

use futures::TryStreamExt;

#[derive(Template)]
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use actix_web::{Error, HttpResponse};
use askama::Template;


use crate::args::{Args, ARGS};

#[derive(Template)]
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/guide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::args::{Args, ARGS};
use actix_web::{get, HttpResponse};
use askama::Template;


#[derive(Template)]
#[template(path = "guide.html")]
struct Guide<'a> {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use actix_web::{get, web, HttpResponse};
use askama::Template;


use crate::args::{Args, ARGS};
use crate::pasta::Pasta;
use crate::util::misc::remove_expired;
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/pasta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use crate::AppState;
use actix_multipart::Multipart;
use actix_web::{get, post, web, Error, HttpResponse};
use askama::Template;

use futures::TryStreamExt;
use magic_crypt::{new_magic_crypt, MagicCryptTrait};
use std::time::{SystemTime, UNIX_EPOCH};
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/qr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use crate::AppState;
use actix_web::{get, web, HttpResponse};
use askama::Template;


#[derive(Template)]
#[template(path = "qr.html")]
struct QRTemplate<'a> {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use crate::util::hashids::to_u64 as hashid_to_u64;
use crate::util::misc::{decrypt, remove_expired};
use crate::AppState;
use askama::Template;

use std::fs;

#[get("/remove/{id}")]
Expand Down
6 changes: 3 additions & 3 deletions src/util/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pub static CURRENT_VERSION: Version = Version {
major: 1,
minor: 1,
patch: 1,
title: Cow::Borrowed("1.1.2"),
long_title: Cow::Borrowed("Version 1.1.2, Build 20240621"),
title: Cow::Borrowed("1.1.3"),
long_title: Cow::Borrowed("Version 1.1.3, Build 20241024"),
description: Cow::Borrowed("This version includes bug fixes and smaller design enhancements."),
date: Cow::Borrowed("2024-06-21"),
date: Cow::Borrowed("2024-10-24"),
update_type: Cow::Borrowed("beta"),
};

Expand Down
2 changes: 1 addition & 1 deletion templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p style="font-size: small; text-align: center;margin-top: 2rem;">
{% if args.footer_text.as_ref().is_none() %}
<a href="https://github.com/overcuriousity/bitvault/">BitVault</a>, forked from <a href="https://microbin.eu">MicroBin</a> by Dániel Szabó and the FOSS
Community. {%- else %} {{ args.footer_text.as_ref().unwrap() | safe }} {%-
Community. {%- else %} {{ args.footer_text.as_ref().unwrap() }} {%-
endif %}
</p>

Expand Down

0 comments on commit 9cf96b2

Please sign in to comment.