Commit Graph
100 Commits
Author SHA1 Message Date
StNicolay 6ebfe4e03f Replaced try_join func by tokio::try_join to be consistent with delete_all 2023-07-20 23:58:29 +03:00
StNicolay 59a11ee37b Added a 200 MB file size limit 2023-07-20 23:42:40 +03:00
StNicolay 63acd976e7 Moved document validation into a sepparate func 2023-07-20 23:28:26 +03:00
StNicolay ff6dcf6dfe Added a transaction for deleting all 2023-07-19 14:56:07 +03:00
StNicolay 255a794b0f Added simple_state_handler macro 2023-07-16 23:12:37 +03:00
StNicolay 4a1aa7203b Simplified Handler::new 2023-07-16 22:59:16 +03:00
StNicolay 010ac62a74 Added ask_name_handler 2023-07-16 22:54:01 +03:00
StNicolay 255f29bfad Started simplifying code using macros 2023-07-16 22:34:11 +03:00
StNicolay 1225adefc2 Now forming MessageIds only from &Message to reduce the amount of moving this large type 2023-07-16 17:28:40 +03:00
StNicolay e25460a3d8 simplified Handler.previous into the chat id and message id 2023-07-16 00:37:41 +03:00
StNicolay 1f016a3694 Now properly answering the callback query 2023-07-16 00:35:29 +03:00
StNicolay e311e33c6d Updated itertools and other deps, removed unnessesary versions from Cargo.toml 2023-07-15 00:12:18 +03:00
StNicolay 667f8b64fb Moved handler.func.is_none check to the top 2023-07-15 00:07:59 +03:00
StNicolay 916b20e33c Updated deps 2023-07-03 15:28:35 +03:00
StNicolay c0fcb41575 Added a prelude to reduce the amount of imports 2023-06-29 17:33:26 +03:00
StNicolay 580641bcf4 Improved master password validation 2023-06-28 00:08:51 +03:00
StNicolay bc56846843 Removed a new line 2023-06-27 22:54:14 +03:00
StNicolay b2c6a40c9d Added rand/std feature in cryptography 2023-06-27 22:53:42 +03:00
StNicolay 0a1d125b04 Improved the char counting in the check_master_pass function 2023-06-27 22:51:34 +03:00
StNicolay c3af7e9a95 Added some constants to reduce the amount of magic values 2023-06-27 22:51:11 +03:00
StNicolay bb89f6d349 Updated debug config 2023-06-27 22:50:57 +03:00
StNicolay fff91dc498 Now fully trimming the text of the message in the state handlers 2023-06-23 13:25:41 +03:00
StNicolay 24420096fd Removed excesive validity checks 2023-06-23 12:36:55 +03:00
StNicolay 497e0ba5bf Added checks if the account already exists in the database 2023-06-23 12:36:36 +03:00
StNicolay be76b09427 Updated GetUsers to provide better inforamtion about invalid accounts to a user 2023-06-23 11:45:37 +03:00
StNicolay d7a049f211 Switched to debian:stable-slim image 2023-06-23 11:45:09 +03:00
StNicolay f1228ed80f Removed library crate for pass_manager 2023-06-23 11:38:54 +03:00
StNicolay 9ef17f31fe Updated docker file for better caching 2023-06-20 20:40:43 +03:00
StNicolay f8d7807c6c Updated deps 2023-06-13 10:40:00 +03:00
StNicolay 3389f0a63d Updated entities to use count method to check the existance of account/master password 2023-06-13 10:39:13 +03:00
StNicolay 4075e04ccc Removed rayon dependency
(I don't know how it got there)
2023-06-12 18:06:56 +03:00
StNicolay ef27285e96 Updated account entity for better readability, now Account::get_names always orders by name 2023-06-12 17:55:21 +03:00
StNicolay 7ece22c081 Now the json in /export is created on a sepparate thread 2023-06-11 16:05:00 +03:00
StNicolay fba2bb0b86 Minor cleanup 2023-06-11 15:58:41 +03:00
StNicolay 8ee9acc12b Removed extra stuff from migration/Cargo.toml 2023-06-11 15:33:25 +03:00
StNicolay d3a55ea702 Now using parking_lot's mutex in import and export 2023-06-11 15:32:49 +03:00
StNicolay e1fb440991 Now scrypt params are created once 2023-06-11 13:05:20 +03:00
StNicolay 2f2ab35b2b Removed a binary migration crate 2023-06-11 13:00:27 +03:00
StNicolay cc02d91c03 Added limits for the amount of workers for /export and /import and moved out async blocks out of them into sepparate functions 2023-06-09 18:05:45 +03:00
StNicolay b0f4d1927a Removed magic values from gen_password. Made generate_password accept constants for the amount the length of the password 2023-06-07 21:35:22 +03:00
StNicolay 5087f8e2c6 Updated deps 2023-06-07 18:03:12 +03:00
StNicolay ab7012ce35 Now using thread_rng for the password generation 2023-06-07 17:59:50 +03:00
StNicolay c8c7ba154a Now checking the hashes in constant time 2023-06-06 20:04:39 +03:00
StNicolay 10601d49ad Handler::func no longer requires a closure to be sync 2023-06-06 16:48:09 +03:00
StNicolay d62f18980a Added messages about no accounts found for get_account and delete commands 2023-06-05 18:48:38 +03:00
StNicolay 9720fec16a No longer logging the error in the delete_message callback 2023-06-05 10:58:29 +03:00
StNicolay f74d34f188 Updated get_accounts to handle the errors of concatenating the accounts 2023-06-05 10:57:47 +03:00
StNicolay 9d0fa17a0e Added GetNewMasterPass state and added restrictions on the master password 2023-06-04 20:41:10 +03:00
StNicolay 4d4cec1353 Updated password generation functions 2023-06-04 19:54:39 +03:00
StNicolay 3b2633c880 Split up get_account_name into 2 states: get_new_name and get_existing_name 2023-06-04 18:46:59 +03:00
StNicolay cc41fbbaa4 Updated DecryptedAccount::validate to use an all method of the iterators 2023-06-04 18:19:54 +03:00
StNicolay 593f438435 Replaced super with crate where applicable 2023-06-01 14:58:48 +03:00
StNicolay a817f7f39c Updated master_password_check to use Arc<dyn Error> instead of a string representation of an error 2023-06-01 14:54:00 +03:00
StNicolay cda07b4d84 Sepparated the code out into 3 more library crates: cryptography, entity and pass_manager 2023-06-01 14:42:35 +03:00
StNicolay c40ffafd69 Improved readability of gen_password.rs by intoducing the bitflags 2023-05-31 18:15:38 +03:00
StNicolay 5566397e66 Updated deps, updated generate_passwords to return an array 2023-05-31 15:26:06 +03:00
StNicolay ee815e5f61 Updated /get_accounts to use a write! macro to concatenate the accounts 2023-05-30 17:38:11 +03:00
StNicolay a0920ba3d3 Updated generic to get the text to send when there's no text 2023-05-30 14:21:04 +03:00
StNicolay 40f7194cbe Added state persistance 2023-05-28 02:21:50 +03:00
StNicolay ef0ccfb457 Simplified the default endpoint 2023-05-28 02:00:12 +03:00
StNicolay 1989283754 Moved Command enum to the commands module 2023-05-28 01:42:06 +03:00
StNicolay c3af1144db delete_optional now just gets Option<&Message> 2023-05-27 22:46:08 +03:00
StNicolay e5a0da9890 House keeping 2023-05-27 21:56:58 +03:00
StNicolay cf28aba231 Now hash password returns an array instead of a vector to remove an allocation during a master password validation 2023-05-26 14:53:03 +03:00
StNicolay e39762916d Split up MasterPass::verify into 2 functions: MasterPass::get and master_pass::Model::verify, refactored check_master_pass 2023-05-26 14:40:28 +03:00
StNicolay 1fb004f949 Updated delete_all to delete the accounts and the master password concurrently 2023-05-26 13:57:33 +03:00
StNicolay 084b72b896 Updated deps 2023-05-23 21:39:27 +03:00
StNicolay 58d1cd56ab Moved Handler and PackagedHandler into state module, converted utils::package_handler into Handler::new 2023-05-23 21:09:28 +03:00
StNicolay a271b72038 Added inline to the functions that can be considered utilities 2023-05-15 19:17:52 +03:00
StNicolay 02d090dd6a Updated models and entities 2023-05-15 19:09:15 +03:00
StNicolay 31c52a7771 Updated deps 2023-05-15 18:24:07 +03:00
StNicolay a2477424a5 Updated generic handler to handle the lack of the text of the message 2023-05-15 18:14:21 +03:00
StNicolay 2f96d84e34 Removed unnessesary closure in gen_password.rs 2023-05-14 14:00:57 +03:00
StNicolay e973116df4 Reduced the amount of filters by using find_by_id 2023-05-14 13:59:42 +03:00
StNicolay 2c69882b13 import.rs now uses the FuturesUnordered to remove a mutex around the vector of failed accounts 2023-05-14 13:57:44 +03:00
StNicolay 7f949e3cdc No longer packaging the vector of accounts in export.rs in Arc<Mutex<_>> 2023-05-14 13:06:48 +03:00
StNicolay b65525cc6e Updated master_pass.rs to improve readablity 2023-05-13 21:21:43 +03:00
StNicolay 4d153d8c44 Updated account.rs to improve readability 2023-05-13 21:10:21 +03:00
StNicolay 0b92bcd9f3 Now creating password on 1 blocking task because the generation doesn't take that long, removed back slash from the password chars 2023-05-12 20:29:44 +03:00
StNicolay 522194c708 Updated deps 2023-05-11 18:38:41 +03:00
StNicolay e7d3b7258f Updated deps 2023-05-10 19:12:49 +03:00
StNicolay 5f34cfb109 Updated generic and get_document to close dialogue on /cancel and errors 2023-05-10 19:12:22 +03:00
StNicolay 996dca00fb Default /cancel now uses deletion markup 2023-05-10 18:49:27 +03:00
StNicolay 8307bee4cf Updated delete_message.rs to send a message if the deletion fails and added a function to just get a handler to chain with the schema 2023-05-10 18:47:46 +03:00
StNicolay 9365c75e6e Updated delete_optional to get Option<impl Borrow<Message>>, update get_document to actually check that the document was sent 2023-05-09 21:09:30 +03:00
StNicolay 26ac79a2ed Updated Cargo.lock 2023-05-09 20:39:41 +03:00
StNicolay b326aa696d Added Account::delete_all method 2023-05-09 20:32:07 +03:00
StNicolay 3db99a3626 Added comments to the funtions 2023-05-09 20:27:58 +03:00
StNicolay 207832be43 Updated error message of unwrapping the Arc in import.rs and export.rs, now collection the file in export.rs into Vec instead of String 2023-05-08 19:12:50 +03:00
StNicolay 05c7f721ec Added start command 2023-05-07 20:31:01 +03:00
StNicolay 00bbb7e960 Added cancel command to allow the user to know that they can use it 2023-05-07 20:11:52 +03:00
StNicolay 3a9c038090 Added basic checks for the account fields 2023-05-07 19:04:48 +03:00
StNicolay 072e030e32 Added gen password command 2023-05-07 18:07:48 +03:00
StNicolay ef3a188120 Added deletion markup for the message that the master password isn't set 2023-05-07 16:37:56 +03:00
StNicolay fd94cb317f Added docker files for the bot and the database 2023-05-07 16:34:41 +03:00
StNicolay 2fb6fbe6a3 Added descriptions to the commands 2023-05-07 14:49:53 +03:00
StNicolay bc08ebed03 Made migration binary use tokio instead of async-std to reduce the amount of dependencies 2023-05-07 14:32:17 +03:00
StNicolay 8d68cb5b2b Added an early master password check for the commands that rely on its existance 2023-05-07 14:24:58 +03:00
StNicolay ab6e4d9233 Added Handler struct to hold the boxed next step handler and the previous message to be able to delete the previous message to allways delete it 2023-05-07 13:20:11 +03:00
StNicolay c264623510 Added button for deleting the resulting message 2023-05-06 21:02:32 +03:00