Exploit databaseDownload repository ZIP
GH-8c7f0e4b0e998904a1d6f7dcd99e3e7d
d-xuan/cve-2024-52510
Sources for CVE-2024-52510
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files41
d-xuan/cve-2024-52510Revision 6c0d89756ae0
- ↑..Parent directory
- AppPasswordController.php
- AutoCompleteController.php
- AvatarController.php
- CSRFTokenController.php
- ClientFlowLoginController.php
- ClientFlowLoginV2Controller.php
- CollaborationResourcesController.php
- ContactsMenuController.php
- CssController.php
- ErrorController.php
- GuestAvatarController.php
- HoverCardController.php
- JsController.php
- LoginController.php
- LostController.php
- NavigationController.php
- OCJSController.php
- OCMController.php
- OCSController.php
- PreviewController.php
- ProfileApiController.php
- ProfilePageController.php
- RecommendedAppsController.php
- ReferenceApiController.php
- ReferenceController.php
- SearchController.php
- SetupController.php
- TaskProcessingApiController.php
- TeamsApiController.php
- TextProcessingApiController.php
- TextToImageApiController.php
- TranslationApiController.php
- TwoFactorChallengeController.php
- UnifiedSearchController.php
- UnsupportedBrowserController.php
- UserController.php
- WalledGardenController.php
- WebAuthnController.php
- WellKnownController.php
- WhatsNewController.php
- WipeController.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
core/Controller/HoverCardController.php
PHP · 1,752 bytes<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\Core\Controller;
use OC\Contacts\ContactsMenu\Manager;
use OCA\Core\ResponseDefinitions;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\ApiRoute;
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;
use OCP\IUserSession;
use OCP\Share\IShare;
/**
* @psalm-import-type CoreContactsAction from ResponseDefinitions
*/
class HoverCardController extends \OCP\AppFramework\OCSController {
public function __construct(
IRequest $request,
private IUserSession $userSession,
private Manager $manager,
) {
parent::__construct('core', $request);
}
/**
* @NoAdminRequired
*
* Get the account details for a hovercard
*
* @param string $userId ID of the user
* @return DataResponse<Http::STATUS_OK, array{userId: string, displayName: string, actions: CoreContactsAction[]}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>
*
* 200: Account details returned
* 404: Account not found
*/
#[ApiRoute(verb: 'GET', url: '/v1/{userId}', root: '/hovercard')]
public function getUser(string $userId): DataResponse {
$contact = $this->manager->findOne($this->userSession->getUser(), IShare::TYPE_USER, $userId);
if (!$contact) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
$data = $contact->jsonSerialize();
$actions = $data['actions'];
if ($data['topAction']) {
array_unshift($actions, $data['topAction']);
}
/** @var CoreContactsAction[] $actions */
return new DataResponse([
'userId' => $userId,
'displayName' => $contact->getFullName(),
'actions' => $actions,
]);
}
}