diff options
| author | 2014-02-23 12:16:23 +0100 | |
|---|---|---|
| committer | 2014-02-23 12:16:23 +0100 | |
| commit | db120b4ed41584c7e33bfe63015f948e6230f1ab (patch) | |
| tree | 38aac88771a438bc6ce1cc32e8609e38846e8187 /lib/lib_rss.php | |
| parent | f2a8a516aa44a7862a80e9d75c5df12fcfc2badb (diff) | |
Test si crypt() fonctionne pour PHP 5.3.3
https://github.com/marienfressinaud/FreshRSS/issues/432
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index a13d9e951..8c6fb5543 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -233,3 +233,14 @@ function listUsers() { function httpAuthUser() { return isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : ''; } + +function cryptAvailable() { + if (version_compare(PHP_VERSION, '5.3.3', '>=')) { + try { + $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG'; + return $hash === @crypt('password', $hash); + } catch (Exception $e) { + } + } + return false; +} |
