Skip to content
Snippets Groups Projects
Commit 4b01570c authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Fixed a bug in redis connection

parent cec37ace
No related branches found
No related tags found
3 merge requests!1393Development,!1390Development,!1387Resolve "Optimize Human Verification"
...@@ -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"]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment