Commit 4b01570c authored by Dominik Hebeler's avatar Dominik Hebeler

Fixed a bug in redis connection

parent cec37ace
...@@ -17,7 +17,7 @@ class HumanVerification extends Controller ...@@ -17,7 +17,7 @@ class HumanVerification extends Controller
public static function captcha(Request $request, Hasher $hasher, $id, $url = null) public static function captcha(Request $request, Hasher $hasher, $id, $url = null)
{ {
$redis = Redis::connection('REDIS_CACHE_HOST'); $redis = Redis::connection('redisCache');
if ($url != null) { if ($url != null) {
$url = base64_decode(str_replace("<<SLASH>>", "/", $url)); $url = base64_decode(str_replace("<<SLASH>>", "/", $url));
...@@ -107,7 +107,7 @@ class HumanVerification extends Controller ...@@ -107,7 +107,7 @@ class HumanVerification extends Controller
private static function removeUser($request, $uid) private static function removeUser($request, $uid)
{ {
$redis = Redis::conection('REDIS_CACHE_HOST'); $redis = Redis::conection('redisCache');
$id = hash("sha512", $request->ip()); $id = hash("sha512", $request->ip());
$userList = $redis->smembers(HumanVerification::PREFIX . "." . $id); $userList = $redis->smembers(HumanVerification::PREFIX . "." . $id);
......
...@@ -24,7 +24,7 @@ class HumanVerification ...@@ -24,7 +24,7 @@ class HumanVerification
$user = null; $user = null;
$update = true; $update = true;
$prefix = "humanverification"; $prefix = "humanverification";
$redis = Redis::connection('REDIS_CACHE_HOST'); $redis = Redis::connection('redisCache');
try { try {
$id = hash("sha512", $request->ip()); $id = hash("sha512", $request->ip());
$uid = hash("sha512", $request->ip() . $_SERVER["AGENT"]); $uid = hash("sha512", $request->ip() . $_SERVER["AGENT"]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment