mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 06:30:07 +01:00
Fix CAPTCHA
This commit is contained in:
parent
69d1ab44ce
commit
52a1c86bd9
2 changed files with 3 additions and 11 deletions
|
@ -5,8 +5,8 @@ use JetBrains\PhpStorm\ArrayShape;
|
|||
#[ArrayShape(['code' => "mixed|string", 'image_src' => "string"])]
|
||||
function captcha($color, $mode, $mul, $allowed) : array {
|
||||
|
||||
$bg_path = '/assets/img/captcha/';
|
||||
$font_path = '/assets/font/';
|
||||
$bg_path = __DIR__ . '/../assets/img/captcha/';
|
||||
$font_path = __DIR__ . '/../assets/fonts/';
|
||||
|
||||
if ($mul == "on") {
|
||||
$captcha_config = array(
|
||||
|
@ -128,7 +128,7 @@ if (isset($_GET['_CAPTCHA'])) {
|
|||
|
||||
session_start();
|
||||
|
||||
$captcha_config = unserialize($_SESSION['_CAPTCHA']['config']);
|
||||
$captcha_config = unserialize(@$_SESSION['_CAPTCHA']['config']);
|
||||
if (!$captcha_config)
|
||||
exit();
|
||||
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
<?php
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
function getreports($conn, $count = 10) {
|
||||
$query = $conn->prepare('SELECT * FROM user_reports LIMIT ?');
|
||||
$query->execute([$count]);
|
||||
|
||||
return $query->fetchAll();
|
||||
}
|
||||
|
||||
|
||||
function tagsToHtml(array | Collection $tags) : string {
|
||||
$output = "";
|
||||
foreach ($tags as $tagObj) {
|
||||
|
|
Loading…
Add table
Reference in a new issue