From 20f50780c39224fcdcebb8ee80d04169fe88beb6 Mon Sep 17 00:00:00 2001 From: swag Date: Wed, 19 Oct 2022 13:59:57 -0400 Subject: [PATCH] Configurable bcrypt_cost, added TODO --- README.md | 1 + example_post_text.conf | 1 + lib/PostText.pm | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4c5186..14b2d28 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Run the tests locally (against development environment): ## TODOs 1. Some sort of admin/moderator login and view +1. Implement tripcodes 1. CSS ## Crazy future ideas diff --git a/example_post_text.conf b/example_post_text.conf index 0ef6e6c..933f50c 100644 --- a/example_post_text.conf +++ b/example_post_text.conf @@ -3,6 +3,7 @@ remarks_per_page => 5, secrets => ['t0p_s3cr3t'], tripcode_salt => 't0p_s3cr3t', + bcrypt_cost => 14, development => { pg_string => 'postgresql://post_text:t0p_s3cr3t@127.0.0.1/post_text' diff --git a/lib/PostText.pm b/lib/PostText.pm index 659c301..63f8e36 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -11,7 +11,7 @@ sub startup($self) { $self->plugin('Config'); $self->plugin('TagHelpers::Pagination'); $self->plugin(AssetPack => {pipes => [qw{Css Combine}]}); - $self->plugin('BcryptSecure'); + $self->plugin('BcryptSecure', {cost => $self->config->{'bcrypt_cost'}}); # Helpers $self->helper(pg => sub ($c) {