Исправление критической уязвимости
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use dotenv::dotenv;
|
||||
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
||||
#[path="tasks_functions.rs"] mod tasks;
|
||||
|
||||
fn main() {
|
||||
dotenv().ok();
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
tasks::check_or_create_tasks_file,
|
||||
|
||||
@@ -7,7 +7,7 @@ use serde_json::{Value, json};
|
||||
use rust_fuzzy_search::fuzzy_search_best_n;
|
||||
|
||||
pub fn encrypt_n_save_file(path: PathBuf, content: String){
|
||||
let mc = new_magic_crypt!("7J?VKYJib`=NIOpapW+zP8wD_#lPjP77Z)Q:4QUlH4`0rpMz7]>EIC%$RV-9*iW9AZ>Qk!OmAuH`8GzJ93xR4`KTl*-#fuCKzDfrPe&-A0?^Mz<F8IJ((oe+X,73iG", 256);
|
||||
let mc = new_magic_crypt!(std::env::var("ENC_KEY").unwrap(), 256);
|
||||
|
||||
let mut encrypted: String = String::new();
|
||||
|
||||
@@ -22,7 +22,7 @@ pub fn encrypt_n_save_file(path: PathBuf, content: String){
|
||||
}
|
||||
|
||||
pub fn decrypt_file(path: PathBuf) -> String {
|
||||
let mc = new_magic_crypt!("7J?VKYJib`=NIOpapW+zP8wD_#lPjP77Z)Q:4QUlH4`0rpMz7]>EIC%$RV-9*iW9AZ>Qk!OmAuH`8GzJ93xR4`KTl*-#fuCKzDfrPe&-A0?^Mz<F8IJ((oe+X,73iG", 256);
|
||||
let mc = new_magic_crypt!(std::env::var("ENC_KEY").unwrap(), 256);
|
||||
|
||||
let mut decrypted: String = String::new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user