Page MenuHomePhorge

Account registration: Handle too long Real Name more gracefully
Closed, ResolvedPublic

Description

Upstreaming stuff found in our server logs...

Steps to reproduce:

  1. Go to http://phorge.localhost/auth/register/
  2. Enter some Username, Password, Confirm Password, Email
  3. Enter a Real Name with 4681 characters
  4. Click "Register Account"

Expected behavior:

A nice error message, like already shown for a too long Username

Actual outcome (using MariaDB):

UI:
Unhandled Exception ("AphrontQueryException")
#1406: Data too long for column 'realName' at row 1
Server log:
[2024-11-29 13:49:12] EXCEPTION: (AphrontQueryException) #1406: Data too long for column 'realName' at row 1 at [<phorge>/src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:396]
arcanist(head=master, ref.master=29ca3df1122b), phorge(head=master, ref.master=a68b8daafde3)
  #0 <#2> AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phorge>/src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:321]
  #1 <#2> AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phorge>/src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:217]
  #2 <#2> AphrontBaseMySQLDatabaseConnection::executeQuery(PhutilQueryString) called at [<phorge>/src/infrastructure/storage/xsprintf/queryfx.php:8]
  #3 <#2> queryfx(AphrontMySQLiDatabaseConnection, string, PhutilQueryString, PhabricatorUser, array, array) called at [<phorge>/src/infrastructure/storage/connection/AphrontDatabaseConnection.php:58]
  #4 <#2> AphrontDatabaseConnection::query(string, PhutilQueryString, PhabricatorUser, array, array) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:1122]
  #5 <#2> LiskDAO::insertRecordIntoDatabase(string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:958]
  #6 <#2> LiskDAO::insert() called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:927]
  #7 <#2> LiskDAO::save() called at [<phorge>/src/applications/people/storage/PhabricatorUser.php:270]
  #8 <#2> PhabricatorUser::saveWithoutIndex() called at [<phorge>/src/applications/people/storage/PhabricatorUser.php:283]
  #9 <#2> PhabricatorUser::save() called at [<phorge>/src/applications/people/editor/PhabricatorUserEditor.php:64]
  #10 <#2> PhabricatorUserEditor::createNewUser(PhabricatorUser, PhabricatorUserEmail, boolean) called at [<phorge>/src/applications/auth/controller/PhabricatorAuthRegisterController.php:425]
  #11 <#2> PhabricatorAuthRegisterController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #12 phlog(AphrontQueryException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #13 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, AphrontQueryException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:753]
  #14 AphrontApplicationConfiguration::handleThrowable(AphrontQueryException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #15 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #16 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
[2024-11-29 13:49:12] EXCEPTION: (Exception) Process exited with an open transaction! The transaction will be implicitly rolled back. Calls to openTransaction() must always be paired with a call to saveTransaction() or killTransaction(). at [<phorge>/src/infrastructure/storage/connection/AphrontDatabaseTransactionState.php:78]
arcanist(head=master, ref.master=29ca3df1122b), phorge(head=master, ref.master=a68b8daafde3)
  #0 AphrontDatabaseTransactionState::__destruct()

Related Objects

Mentioned In
Next Up