Exploit database

GH-7feacea856188eafd49a6762828c436f

chocapikk/cve-2023-35885

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-35885

4 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files6
chocapikk/cve-2023-35885Revision 78ece7c3f53e

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/Security/UserProvider.php

PHP · 2,343 bytes
<?php
 namespace App\Security; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\Exception\UserNotFoundException; use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserProviderInterface; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Doctrine\ORM\EntityManagerInterface; use App\Repository\UserRepository; use App\Entity\User; class UserProvider implements UserProviderInterface, PasswordUpgraderInterface { private UserRepository $userRepository; public function __construct(EntityManagerInterface $entityManager) { $this->userRepository = $entityManager->getRepository(User::class); } public function loadUserByIdentifier(string $identifier) : UserInterface { goto bad1d; d1b74: if (!(true === is_null($user) || false === is_null($user) && $user->getStatus() == User::STATUS_NOT_ACTIVE)) { goto fd1bf; } goto D181b; B193b: return $user; goto cb189; C9310: fd1bf: goto A7a04; A7a04: $user->addRole($user->getRole()); goto B193b; D181b: throw new UserNotFoundException(); goto C9310; bad1d: $user = $this->userRepository->findOneByUserName($identifier); goto d1b74; cb189: } public function refreshUser(UserInterface $user) { goto B4b8a; a0d73: if (!(true === is_null($user) || false === is_null($user) && $user->getStatus() == User::STATUS_NOT_ACTIVE)) { goto c8922; } goto a152d; bb551: $userId = $user->getId(); goto C7988; Eb64e: c8922: goto D26a4; E92e4: return $user; goto b05cc; C7988: $user = $this->userRepository->findOneById($userId); goto a0d73; cb4ee: A87a6: goto bb551; B4b8a: if ($user instanceof User) { goto A87a6; } goto a0c6c; a0c6c: throw new UnsupportedUserException(sprintf("\111\x6e\166\141\154\151\x64\40\165\163\x65\162\40\143\154\x61\x73\163\40\x22\45\163\42\x2e", get_class($user))); goto cb4ee; D26a4: $user->addRole($user->getRole()); goto E92e4; a152d: throw new UserNotFoundException(); goto Eb64e; b05cc: } public function supportsClass(string $class) : bool { return User::class === $class || is_subclass_of($class, User::class); } public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword) : void { } public function loadUserByUsername(string $username) { } }