Commit 2268f8b6 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

added another verificator

parent 4b58d024
......@@ -142,6 +142,7 @@ class HumanVerification extends Controller
$verificator = $hv_entry["class"]::impersonate($hv_entry["id"], $hv_entry["uid"]);
$verificator->verifyUser();
}
Cache::forget($request->input("hv"));
}
return response(hex2bin('89504e470d0a1a0a0000000d494844520000000100000001010300000025db56ca00000003504c5445000000a77a3dda0000000174524e530040e6d8660000000a4944415408d76360000000020001e221bc330000000049454e44ae426082'), 200)
......@@ -161,6 +162,7 @@ class HumanVerification extends Controller
$verificator = $hv_entry["class"]::impersonate($hv_entry["id"], $hv_entry["uid"]);
$verificator->verifyUser();
}
Cache::forget($hv);
}
}
......
<?php
namespace App\Models\Verification;
class AgentVerification extends Verification
{
public function __construct($id = null, $uid = null)
{
$this->cache_prefix = "humanverification.ip";
$request = \request();
$ip = $request->ip();
if (empty($id) || empty($uid)) {
$id = hash("sha1", $_SERVER["AGENT"]);
$uid = hash("sha1", $_SERVER["AGENT"] . $ip . "uid");
}
parent::__construct($id, $uid);
}
public static function impersonate($id, $uid)
{
return new IPVerification($id, $uid);
}
}
......@@ -13,6 +13,7 @@ class HumanVerification
public function __construct()
{
$this->verificators[] = new IPVerification();
$this->verificators[] = new AgentVerification();
$this->key = \md5("hv.key." . microtime(true));
$ids = [];
......
......@@ -4,4 +4,10 @@
border: 1px solid white;
background-color: #4a4a4a;
border-radius: 5px;
}
#main-content {
flex-direction: row !important;
gap: 1rem;
overflow: auto;
}
\ No newline at end of file
Supports Markdown
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