CasperSecurity

Current Path : /usr/share/phpmyadmin/libraries/classes/Controllers/
Upload File :
Current File : //usr/share/phpmyadmin/libraries/classes/Controllers/VersionCheckController.php

<?php

declare(strict_types=1);

namespace PhpMyAdmin\Controllers;

use PhpMyAdmin\Core;
use PhpMyAdmin\VersionInformation;
use function json_encode;

/**
 * A caching proxy for retrieving version information from https://www.phpmyadmin.net/.
 */
class VersionCheckController extends AbstractController
{
    public function index(): void
    {
        $_GET['ajax_request'] = 'true';

        // Disabling standard response.
        $this->response->disable();

        // Always send the correct headers
        Core::headerJSON();

        $versionInformation = new VersionInformation();
        $versionDetails = $versionInformation->getLatestVersion();

        if (empty($versionDetails)) {
            echo json_encode([]);

            return;
        }

        $latestCompatible = $versionInformation->getLatestCompatibleVersion(
            $versionDetails->releases
        );
        $version = '';
        $date = '';
        if ($latestCompatible != null) {
            $version = $latestCompatible['version'];
            $date = $latestCompatible['date'];
        }
        echo json_encode([
            'version' => ! empty($version) ? $version : '',
            'date' => ! empty($date) ? $date : '',
        ]);
    }
}
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY