NC 19 PHP Update 7.2 -> 7.4 Login not possible

Nextcloud version (eg, 18.0.2): 19.0.4
Operating system and version (eg, Ubuntu 20.04): CentOS 7
Apache or nginx version (eg, Apache 2.4.25): nginx 1.19.4
PHP version (eg, 7.1): php 7.2.34 and php 7.4.12

The issue you are facing:
When I try to login with php 7.2 everything is fine - do I switch to PHP 7.4 I cannot login anymore and it says wrong user or password and in nextcloud.log it directly says bruteforce attempt… I disabled 2FA but this doesn’t help

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. PHP 72 - Login - OK
  2. switch nginx config to php74 socket and reload nginx config
  3. PHP 74 - Login - “wrong username or password” (bruteforce attempt)

The output of your Nextcloud log in Admin > Logging:

LOGIN PHP 7.2
==========================

{"reqId":"a0jjxsxqhzpdfpUuQKgp","level":0,"time":"2020-10-31T01:05:18+00:00","remoteAddr":"192.168.2.10","user":"Ronin-Jay","app":"no app in context","method":"GET","url":"/apps/files/","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}
{"reqId":"a0jjxsxqhzpdfpUuQKgp","level":0,"time":"2020-10-31T01:05:18+00:00","remoteAddr":"192.168.2.10","user":"Ronin-Jay","app":"no app in context","method":"GET","url":"/apps/files/","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}
{"reqId":"a0jjxsxqhzpdfpUuQKgp","level":0,"time":"2020-10-31T01:05:18+00:00","remoteAddr":"192.168.2.10","user":"Ronin-Jay","app":"no app in context","method":"GET","url":"/apps/files/","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}
{"reqId":"a0jjxsxqhzpdfpUuQKgp","level":0,"time":"2020-10-31T01:05:18+00:00","remoteAddr":"192.168.2.10","user":"Ronin-Jay","app":"no app in context","method":"GET","url":"/apps/files/","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}
{"reqId":"a0jjxsxqhzpdfpUuQKgp","level":0,"time":"2020-10-31T01:05:18+00:00","remoteAddr":"192.168.2.10","user":"Ronin-Jay","app":"no app in context","method":"GET","url":"/apps/files/","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}
{"reqId":"a0jjxsxqhzpdfpUuQKgp","level":0,"time":"2020-10-31T01:05:18+00:00","remoteAddr":"192.168.2.10","user":"Ronin-Jay","app":"no app in context","method":"GET","url":"/apps/files/","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}
{"reqId":"a0jjxsxqhzpdfpUuQKgp","level":0,"time":"2020-10-31T01:05:18+00:00","remoteAddr":"192.168.2.10","user":"Ronin-Jay","app":"no app in context","method":"GET","url":"/apps/files/","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}


LOGIN PHP 7.4
==========================
{"reqId":"R9UPxnO23gaT6rcsVtb6","level":2,"time":"2020-10-31T01:06:56+00:00","remoteAddr":"192.168.2.10","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: Ronin-Jay (Remote IP: 192.168.2.10)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}
{"reqId":"R9UPxnO23gaT6rcsVtb6","level":1,"time":"2020-10-31T01:06:57+00:00","remoteAddr":"192.168.2.10","user":"--","app":"core","method":"POST","url":"/login","message":"Bruteforce attempt from \"192.168.2.10\" detected for action \"login\".","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}


{"reqId":"rWkb5vzHd4EQ1CKZrvXH","level":2,"time":"2020-10-31T01:38:45+00:00","remoteAddr":"192.168.2.10","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: Ronin-Jay (Remote IP: 192.168.2.10)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}
{"reqId":"rWkb5vzHd4EQ1CKZrvXH","level":1,"time":"2020-10-31T01:38:47+00:00","remoteAddr":"192.168.2.10","user":"--","app":"core","method":"POST","url":"/login","message":"Bruteforce attempt from \"192.168.2.10\" detected for action \"login\".","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"19.0.4.2"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocdbmr2yh9pn',
  'passwordsalt' => '...........',
  'secret' => '..........',
  'trusted_domains' =>
  array (
    0 => 'sub.dom.tld',
  ),
  'datadirectory' => '/data/www/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '19.0.4.2',
  'overwrite.cli.url' => 'https://sub.dom.tld',
  'overwritehost' => 'sub.dom.tld',
  'overwriteprotocol' => 'https',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'dbnext',
  'dbhost' => 'localhost:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'user',
  'dbpassword' => 'password',
  'installed' => true,
  'updater.release.channel' => 'stable',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Memcached',
  'memcached_servers' =>
  array (
    0 =>
    array (
      0 => 'localhost',
      1 => 11211,
    ),
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  ... mail-settings
);

“bruteforce” and “2fa” are two different function and have nothing to do with each other. If you get a message related to brute force attempts, try to clean the oc_bruteforce_attempts table. You will find further information using the search function of this forum, because this problem happens from time to time.

Thx j-ed. I know that it has nothing to do with each other…and I use the search function.
I also had some very few login problems with php 72 (loop) in the past and solved them by cleaning the cache but this doesn’t help with php 7.4! I can’t login with php 7.4 and I disabled 2FA as this is the only addition app I installed I wanted to exclude problems with the installed app.
It’s strange on 7.4 that it directly logs a bruteforce attempt.