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

Schalter für die Bot Protection in die Config eingebaut. Captcha wird nun auch korrekt angezeigt.

parent 59d78abf
No related branches found
No related tags found
1 merge request!1262WIP: Resolve "Spendenseite Texte anpassen"
......@@ -25,7 +25,7 @@ class HumanVerification
* If someone that uses a bot finds this out we
* might have to change it at some point.
*/
if($request->filled('password') || $request->filled('key')){
if($request->filled('password') || $request->filled('key') || !env('BOT_PROTECTION', false)){
return $next($request);
}
......@@ -39,7 +39,7 @@ class HumanVerification
['id' => $id, 'unusedResultPages' => 1, 'locked' => false, 'updated_at' => now()]
);
$user = DB::table('humanverification')->where('id', $id)->first();
}else if($user->locked !== "1"){
}else if($user->locked !== 1){
$unusedResultPages = intval($user->unusedResultPages);
$unusedResultPages++;
# We have different security gates:
......@@ -55,7 +55,7 @@ class HumanVerification
# If the user is locked we will force a Captcha validation
if($user->locked === "1"){
if($user->locked === 1){
return redirect('meta/verification/' . $id . '/' . urlencode(base64_encode(url()->full())));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment