Page MenuHomePhorge

PhabricatorAuthCSRFEngine.php:50 strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated
Closed, ResolvedPublic

Description

This error was somehow generated, but I am not sure how to replicate. Some combination of a database timeout and CSRF failure -

AH01071: Got error 'PHP message: [2023-10-25 02:26:25] ERROR 8192: strncmp(): Passing null to parameter
#1 ($string1) of type string is deprecated at [<phorge>/src/applications/auth/engine/PhabricatorAuthCSRFEngine.php:50]PHP message: arcanist(head=master, ref.master=ba42b63704b2, custom=4), phorge(head=master, ref.master=1720209f16c3)PHP message:
#0 strncmp(NULL, string, integer) called at [<phorge>/src/applications/auth/engine/PhabricatorAuthCSRFEngine.php:50]PHP message:
#1 PhabricatorAuthCSRFEngine::isValidToken(NULL) called at [<phorge>/src/applications/people/storage/PhabricatorUser.php:985]PHP message:
#2 PhabricatorUser::validateCSRFToken(NULL) called at [<phorge>/src/aphront/AphrontRequest.php:348]PHP message:
#3 AphrontRequest::validateCSRF() called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:175]PHP message:
#4 PhabricatorConduitAPIController::authenticateUser(ConduitAPIRequest, array, string) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:50]PHP message:
#5 PhabricatorConduitAPIController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]PHP message:
#6 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]PHP message:
#7 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]PHP message: [2023-10-25 02:26:25] EXCEPTION: (AphrontMalformedRequestException) You are trying to save some data to permanent storage, but the request your browser made included an incorrect token. Reload the page and try again. You may need to clear your cookies.\nThis was a Web request.\nThis request had no CSRF token. at [<phorge>/src/aphront/AphrontRequest.php:403]PHP message: arcanist(head=master, ref.master=ba42b63704b2, custom=4), phorge(head=master, ref.master=1720209f16c3)PHP message:
#0 <#2> AphrontRequest::validateCSRF() called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:175]PHP message:
#1 <#2> PhabricatorConduitAPIController::authenticateUser(ConduitAPIRequest, array, string) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:50]PHP message:
#2 phlog(AphrontMalformedRequestException) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:111]PHP message:
#3 PhabricatorConduitAPIController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]PHP message:
#4 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]PHP message:
#5 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]PHP message: [2023-10-25 02:26:55] EXCEPTION: (AphrontQueryTimeoutQueryException) Query timed out after 30 second(s)! at [<phorge>/src/infrastructure/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:156]PHP message: arcanist(head=master, ref.master=ba42b63704b2, custom=4), phorge(head=master, ref.master=1720209f16c3)PHP message:
#0 <#2> AphrontMySQLiDatabaseConnection::rawQuery(string) called at [<phorge>/src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:204]PHP message:
#1 <#2> AphrontBaseMySQLDatabaseConnection::executeQuery(PhutilQueryString) called at [<phorge>/src/infrastructure/storage/xsprintf/queryfx.php:8]PHP message:
#2 <#2> queryfx(AphrontMySQLiDatabaseConnection, string, PhutilQueryString, PhabricatorConduitMethodCallLog, array, array) called at [<phorge>/src/infrastructure/storage/connection/AphrontDatabaseConnection.php:58]PHP message:
#3 <#2> AphrontDatabaseConnection::query(string, PhutilQueryString, PhabricatorConduitMethodCallLog, array, array) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:1118]PHP message:
#4 <#2> LiskDAO::insertRecordIntoDatabase(string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:954]PHP message:
#5 <#2> LiskDAO::insert() called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:923]PHP message:
#6 <#2> LiskDAO::save() called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:127]PHP message:
#7 <#2> PhabricatorConduitAPIController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]PHP message:
#8 phlog(AphrontQueryTimeoutQueryException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]PHP message:
#9 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, AphrontQueryTimeoutQueryException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]PHP message:
#10 AphrontApplicationConfiguration::handleThrowable(AphrontQueryTimeoutQueryException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]PHP message:
#11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]PHP message:
#12 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]'

Related Objects