From 2965a981b7ec22866fbdf2d567d87e2d068d3617 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Fri, 31 Jul 2015 16:04:08 -0400
Subject: [PATCH] Allow to search and import missing PGP pubkeys from keyservers using Publickey.js
---
plugins/password/drivers/sql.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index ab348dd..37e162e 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -66,8 +66,10 @@
$len = 2;
break;
case 'blowfish':
- $len = 22;
- $salt_hashindicator = '$2a$';
+ $cost = (int) $rcmail->config->get('password_blowfish_cost');
+ $cost = $cost < 4 || $cost > 31 ? 12 : $cost;
+ $len = 22;
+ $salt_hashindicator = sprintf('$2a$%02d$', $cost);
break;
case 'sha256':
$len = 16;
--
Gitblit v1.9.1