Page MenuHomePhorge

PHP 8.1 "explode(null)" exception blocks rendering "Provide Multi-Factor Credentials" page
Closed, ResolvedPublic

Description

  1. PHP 8.2.6; Phorge at 2df7ea13a3877250354556f08f40e26ccc727144 with D25219 on top
  2. Set up 2FA for an average user:
  1. Log out as average user
  2. On the terminal, run ./bin/auth recover username and open that link
  3. Select Log In (username) button on http://phorge.localhost/login/once/recover/5/abcdefghijklmnopqrstuvwxyz123456/
[2023-05-13 13:40:33] EXCEPTION: (RuntimeException) explode(): Passing null to parameter #2 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=conduitArrayFuse, ref.master=c14785c3795c, ref.conduitArrayFuse=81b4031f19f7), phorge(head=multifactorauthme, ref.master=2df7ea13a387, ref.multifactorauthme=2df7ea13a387)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/error/PhutilErrorHandler.php:261]
  #1 <#2> explode(string, NULL) called at [<phorge>/src/applications/auth/storage/PhabricatorAuthChallenge.php:60]
  #2 <#2> PhabricatorAuthChallenge::newChallengeResponsesFromRequest(array, AphrontRequest) called at [<phorge>/src/applications/auth/engine/PhabricatorAuthSessionEngine.php:526]
  #3 <#2> PhabricatorAuthSessionEngine::newHighSecurityToken(PhabricatorUser, AphrontRequest, string, string, boolean) called at [<phorge>/src/applications/auth/engine/PhabricatorAuthSessionEngine.php:438]
  #4 <#2> PhabricatorAuthSessionEngine::requireHighSecuritySession(PhabricatorUser, AphrontRequest, string, string) called at [<phorge>/src/applications/auth/controller/PhabricatorAuthFinishController.php:38]
  #5 <#2> PhabricatorAuthFinishController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #6 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #7 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #8 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #9 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #10 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
[2023-05-13 13:40:33] EXCEPTION: (PhutilAggregateException) Encountered a processing exception, then another exception when trying to build a response for the first exception.
    - RuntimeException: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated
    - RuntimeException: explode(): Passing null to parameter #2 ($string) of type string is deprecated at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:316]
arcanist(head=conduitArrayFuse, ref.master=c14785c3795c, ref.conduitArrayFuse=81b4031f19f7), phorge(head=multifactorauthme, ref.master=2df7ea13a387, ref.multifactorauthme=2df7ea13a387)
  #0 <#4> explode(string, NULL) called at [<phorge>/src/applications/auth/storage/PhabricatorAuthChallenge.php:60]
  #1 <#4> PhabricatorAuthChallenge::newChallengeResponsesFromRequest(array, AphrontRequest) called at [<phorge>/src/applications/auth/engine/PhabricatorAuthSessionEngine.php:526]
  #2 <#4> PhabricatorAuthSessionEngine::newHighSecurityToken(PhabricatorUser, AphrontRequest, string, string, boolean) called at [<phorge>/src/applications/auth/engine/PhabricatorAuthSessionEngine.php:438]
  #3 <#4> PhabricatorAuthSessionEngine::requireHighSecuritySession(PhabricatorUser, AphrontRequest, string, string) called at [<phorge>/src/applications/auth/controller/PhabricatorAuthFinishController.php:38]
  #4 <#4> PhabricatorAuthFinishController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #5 <#3> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/error/PhutilErrorHandler.php:261]
  #6 <#3> file_exists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1068]
  #7 <#3> Filesystem::pathExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1169]
  #8 <#3> Filesystem::assertExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1020]
  #9 <#3> Filesystem::isDescendant(NULL, string) called at [<phorge>/src/view/widget/AphrontStackTraceView.php:33]
  #10 <#3> AphrontStackTraceView::render() called at [<phorge>/src/view/AphrontView.php:222]
  #11 <#3> AphrontView::producePhutilSafeHTML() called at [<phorge>/src/infrastructure/markup/render.php:115]
  #12 <#3> phutil_escape_html(AphrontStackTraceView) called at [<phorge>/src/infrastructure/markup/render.php:139]
  #13 <#3> phutil_escape_html(array) called at [<phorge>/src/infrastructure/markup/render.php:97]
  #14 <#3> phutil_tag(string, array, array) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:62]
  #15 <#3> PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #16 <#3> AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #17 <#2> AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #18 <#2> AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
  #19 phlog(PhutilAggregateException) called at [<phorge>/src/aphront/response/AphrontUnhandledExceptionResponse.php:32]
  #20 AphrontUnhandledExceptionResponse::setException(PhutilAggregateException) called at [<phorge>/webroot/index.php:46]

Fix that exception; afterwards "Provide Multi-Factor Credentials" page at http://phorge.localhost/auth/finish/ with the "App Code" field gets rendered in web browser.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.