Feature #37360

Catch PDO exceptions to avoid outputting database information in exception backtrace

Added by Aske Ertmann about 3 years ago. Updated about 3 years ago.

Status:Resolved Start date:2012-05-21
Priority:Should have Due date:
Assigned To:Aske Ertmann % Done:

100%

Category:Persistence
Target version:TYPO3 Flow Base Distribution - 2.0 beta 1
PHP Version:5.3 Complexity:easy
Has patch:Yes

Description

If the PDO connection throws an exception, it's not catched by FLOW3, which leads to a debug backtrace showing the calls to the PDO calls revealing the database information. Even though this only happens in Production context, I still believe that it should not be shown there.

I've created a patch and provided before and after screenshots. I have also testet that normal sql exceptions are not catching by this, e.g. a missing table.

before.jpg (114.5 kB) Aske Ertmann, 2012-05-21 14:55

after.jpg (147.2 kB) Aske Ertmann, 2012-05-21 14:55

Associated revisions

Revision 4df796af
Added by Aske Ertmann about 3 years ago

[FEATURE] Catch PDOExceptions to prevent database information in debug backtrace

Add catching of \PDOExceptions to the Doctrine Query class, and output the
exception message & code, but prevent the debug backtrace leading up to
it, since it contains the database information in the method calls.

Change-Id: Id0fcb66ed3d567f5190805cc023f195f425ceb14
Resolves: #37360
Releases: 1.2

History

#1 Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11369

#2 Updated by Gerrit Code Review about 3 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11370

#3 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11370

#4 Updated by Gerrit Code Review about 3 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11370

#5 Updated by Gerrit Code Review about 3 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11370

#6 Updated by Gerrit Code Review about 3 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11370

#7 Updated by Karsten Dambekalns about 3 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF