http://172.104.159.37/login?p=login

Exceptions

The key "_username" must be a string, "NULL" given.

Exception

Symfony\Component\HttpKernel\Exception\ BadRequestHttpException

  1.             $username ParameterBagUtils::getRequestParameterValue($request$this->options['username_parameter']);
  2.             $password ParameterBagUtils::getRequestParameterValue($request$this->options['password_parameter']);
  3.         }
  4.         if (!\is_string($username) && (!\is_object($username) || !method_exists($username'__toString'))) {
  5.             throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.'$this->options['username_parameter'], \gettype($username)));
  6.         }
  7.         $username trim($username);
  8.         if (\strlen($username) > Security::MAX_USERNAME_LENGTH) {
  1.         try {
  2.             if ($this->options['require_previous_session'] && !$request->hasPreviousSession()) {
  3.                 throw new SessionUnavailableException('Your session has timed out, or you have disabled cookies.');
  4.             }
  5.             if (null === $returnValue $this->attemptAuthentication($request)) {
  6.                 return;
  7.             }
  8.             if ($returnValue instanceof TokenInterface) {
  9.                 $this->sessionStrategy->onAuthentication($request$returnValue);
  1.     public function authenticate(RequestEvent $event)
  2.     {
  3.         $startTime microtime(true);
  4.         try {
  5.             $ret $this->listener->authenticate($event);
  6.         } catch (LazyResponseException $e) {
  7.             $this->response $e->getResponse();
  8.             throw $e;
  9.         } finally {
  1. abstract class AbstractListener
  2. {
  3.     final public function __invoke(RequestEvent $event)
  4.     {
  5.         if (false !== $this->supports($event->getRequest())) {
  6.             $this->authenticate($event);
  7.         }
  8.     }
  9.     /**
  10.      * Tells whether the authenticate() method should be called or not depending on the incoming request.
  1.                 }, $listenerFirewallContext::class)();
  2.                 $listener($event);
  3.             } else {
  4.                 $wrappedListener $listener instanceof AbstractListener ? new WrappedLazyListener($listener) : new WrappedListener($listener);
  5.                 $wrappedListener($event);
  6.                 $wrappedListeners[] = $wrappedListener->getInfo();
  7.             }
  8.             if ($event->hasResponse()) {
  9.                 break;
in vendor/symfony/security-http/Firewall.php -> callListeners (line 98)
  1.                 yield $accessListener;
  2.             }
  3.         };
  4.         if ($event instanceof RequestEvent) {
  5.             $this->callListeners($event$authenticationListeners());
  6.         } else {
  7.             $this->handleRequest($event$authenticationListeners());
  8.         }
  9.     }
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.     {
  2.         foreach ($listeners as $listener) {
  3.             if ($event->isPropagationStopped()) {
  4.                 break;
  5.             }
  6.             $listener($event$eventName$this);
  7.         }
  8.     }
  9.     /**
  10.      * Sorts the internal list of listeners for the given event by priority.
  1.      * @param object     $event     The event object to pass to the event handlers/listeners
  2.      */
  3.     protected function callListeners(iterable $listenersstring $eventName$event)
  4.     {
  5.         if ($event instanceof Event) {
  6.             $this->doDispatch($listeners$eventName$event);
  7.             return;
  8.         }
  9.         $stoppable $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.     {
  2.         $this->requestStack->push($request);
  3.         // request
  4.         $event = new RequestEvent($this$request$type);
  5.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  6.         if ($event->hasResponse()) {
  7.             return $this->filterResponse($event->getResponse(), $request$type);
  8.         }
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 25)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel('dev'true);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Trace

BadRequestHttpException

Symfony\Component\HttpKernel\Exception\BadRequestHttpException:
The key "_username" must be a string, "NULL" given.

  at vendor/symfony/security-http/Firewall/UsernamePasswordFormAuthenticationListener.php:89
  at Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener->attemptAuthentication()
     (vendor/symfony/security-http/Firewall/AbstractAuthenticationListener.php:141)
  at Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener->authenticate()
     (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49)
  at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate()
     (vendor/symfony/security-http/Firewall/AbstractListener.php:27)
  at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke()
     (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:62)
  at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners()
     (vendor/symfony/security-http/Firewall.php:98)
  at Symfony\Component\Security\Http\Firewall->onKernelRequest()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:134)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:25)