Bug #91649

Login Failure Warning not sent when using PostgreSQL or MySQL strict mode

Added by Stephan Großberndt 17 days ago. Updated 7 days ago.

Status:
Under Review
Priority:
Must have
Category:
Authentication
Target version:
-
Start date:
2020-06-15
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

If a $GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'] is set a DBAL-DriverException will occur in the backend log if there have been failed login attempts on a TYPO3 running with PostgreSQL:

Core: Exception handler (WEB):
Uncaught TYPO3 Exception:
An exception occurred while executing 
'SELECT COUNT("uid") FROM "sys_log" WHERE ("type" = ?) AND ("action" = ?) AND ("error" <> ?) AND ("tstamp" > ?) ORDER BY "tstamp" ASC'
with params
[255, 3, 0, 1592228590]:
SQLSTATE[42803]: Grouping error: 7 FEHLER: Spalte »sys_log.tstamp« muss in der GROUP-BY-Klausel erscheinen oder in einer Aggregatfunktion verwendet werden
LINE 1: ... AND ("error" <> $3) AND ("tstamp" > $4) ORDER BY "tstamp" A... ^
Doctrine\DBAL\Exception\DriverException thrown in file /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php in line 79.
Requested URL: https://example.org/typo3/index.php?loginProvider=1433416747

This leads to the warning email not being sent.

History

#1 Updated by Stephan Großberndt 17 days ago

  • Project changed from TYPO3 Core to Core Security
  • Category deleted (Security)

#2 Updated by Stephan Großberndt 17 days ago

  • Description updated (diff)

#3 Updated by Markus Klein 16 days ago

So this is an invalid SQL query, which will also fail on MySQL strict mode (full_group_by)

#4 Updated by Stephan Großberndt 16 days ago

  • Project changed from Core Security to TYPO3 Core
  • Subject changed from Login Failure Warning not sent when using PostgreSQL to Login Failure Warning not sent when using PostgreSQL or MySQL strict mode
  • Category set to Authentication
  • Complexity set to no-brainer

yes, exactly.

#5 Updated by Gerrit Code Review 16 days ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64899

#6 Updated by Gerrit Code Review 7 days ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64899

Also available in: Atom PDF