4 / 4
Dec 2022

Das Maintainance Release mit dem Standard-Docker-Container auf PHP 8.1 umgestellt, führt zum PHP Fehler in Auth.php:

egroupware-nginx | 2022/12/06 18:18:06 [error] 21#21: *1 FastCGI sent in stderr: "
PHP message: An error happened! (TypeError): Unsupported operand types: string - float
PHP message: File: /api/src/Auth.php, Line: 232
PHP message: #0 /usr/share/egroupware/api/src/Framework.php(488): EGroupware\Api\Auth::check_password_change()
PHP message: #1 /usr/share/egroupware/api/src/Framework/Ajax.php(267): EGroupware\Api\Framework->_get_header()
PHP message: #2 /usr/share/egroupware/pixelegg/inc/class.pixelegg_framework.inc.php(68): EGroupware\Api\Framework\Ajax->header()
PHP message: #3 /usr/share/egroupware/index.php(126): pixelegg_framework->header()
PHP message: # ...

Ralf Becker vermutete hier einen Fehler in den Einstellungen (Security - Passworteinstellungen). Aber das trifft nicht zu - dort sind die Defaultwerte eingetragen (Admin->site configuration->Security).

Mit dem (alten) Containerimage mit der PHP Version 7.4. funktioniert das System mit einer PHP-Warnung.

egroupware-nginx | 2022/12/06 19:10:15 [error] 22#22: *5 FastCGI sent in stderr: "
PHP message: PHP Warning: A non-numeric value encountered in /usr/share/egroupware/api/src/Auth.php on line 232
PHP message: File: /api/src/loader/exception.php, Line: 190
PHP message: #1 /usr/share/egroupware/api/src/Framework.php(488): EGroupware\Api\Auth::check_password_change()
PHP message: #2 /usr/share/egroupware/api/src/Framework/Ajax.php(267): EGroupware\Api\Framework->_get_header()
PHP message: #3 /usr/share/egroupware/pixelegg/inc/class.pixelegg_framework.inc.php(68): EGroupware\Api\Framework\Ajax->header()
PHP message: #4 /usr/share/egroupware/index.php(126): pixelegg_framework->header()
PHP message:  ...

Es betrifft dann die gleichen Eintrittspunkte …

Zusätzlich (seit Umstellung der Site auf die Dockervariante im März 2022) bekomme ich eine stehende/wiederkehrende Fehlermeldung:

“Administrator requires that you must change your password upon log in.”

Ändere ich das als User, erscheint diese Fehlermeldung nicht mehr - aber nur so lange bis ich mich neu einlogge, dann wieder diese (stehende/ wiederkehrende) Fehlermeldung.

In Auth.php betrifft das die check_password_change() Ich hatte da am Anfang auch “quick & dirty” einfach am Anfang ein

return true;

eingefügt . Das hat bis zum Update im September 22 der Standardcontainer auch funktioniert - jetzt funktioniert das ebenfalls nicht mehr (Maintainace Update 3.12.22).

Meine EGW-Installation besteht seit dem Jahr 2003/2004 - DB-Artefakte ?

Andreas

  • created

    Dec '22
  • last reply

    Dec '22
  • 3

    replies

  • 731

    views

  • 2

    users

  • 3

    links

Hallo Andreas,

das hätte wir auch im Deutschen Forum weiter diskutieren können, ich bin der einzige Entwickler der Deutsch spricht.

In der Auth.php Zeile 232 steht folgendes:

Den float-Cast habe ich nach Deiner Meldung eingebaut, das war aber offensichtlich nicht (das einzige) Problem.

Da Du weißt wie man den Code im Container bearbeiten kann, würde ich vorschlagen Du machst noch so einen Cast dort rein:

$daysLeftUntilChangeReq = ((float)$GLOBALS['egw_info']['server']['change_pwd_every_x_days'] - ((DateTime::to('now','ts')-(float)($alpwchange_val?$alpwchange_val:0))/86400));

Danach must Du Container neu starten oder docker exec -it egroupware kill -sUSR2 1 ausführen.

Ralf

Hello Ralf,

excuse me for taking the wrong English-discussion room … so meet the criteria in this forum I will switch to English.

I appreciate your help and and did the following:

1.) switching back to the standard container 21.1 with PHP Version 8.1.13
2.) stopping and starting all containers via docker-compose down/ docker-compose up -d was working
3.) now the login is working again

What is happening now:

1.) on the landing page I’m forced to put in a new password
2.) ok, login with a new password …
2.) logging out
3.) next try to log in … on the landing page I’m again forced to change the password
4.) go to 2.)

Results:

  1. the Type Cast is working and now no more String-Float-Problems occur.
  2. the error message “Administrator requires that you must change your password upon log in.” now is bothering me again.
    3.) I checked Admin->site configuration->security … there are all default values, specially empty fields:
  • Set recurrent forced password change. Set a number of days. Empty = No:
  • Set number of days to inform users in advance about upcoming forced password change. Empty = No information:
  • Passwords require a minimum number of characters: None
    Passwords requires this number of different character classes
    (Uppercase, lowercase, number, special char) None
  • Reject passwords containing part of username or full name (3 or more characters long): No

Next test:

  1. trying to login - EGW tells me to change the password
  2. but now I do restart only the egroupware container with docker restart egroupware
  3. the login without new password ist possible, but the above mentioned error message returns.

I’m not an PHP-Progammer, so that I#m running out of good ideas …

Andreas

I commited now the 2nd type-cast, so you wont have to fix that, the next time you update:

About the need/message to change the password: I believe your LDAP is returning something, EGroupware understands as the password is expired / needs changing. Can you share the ldapsearch result for that account, maybe with some sensible things masked out (password-hash, real names, …).

I might be able to figure it out with that data, otherwise you probably have to buy some support-budget, so we can have a look at it directly on your system.

Ralf