Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error changing password as an admin for a user (v0.91) #1089

Closed
forestvogo opened this issue Jan 21, 2022 · 8 comments · Fixed by #1099
Closed

Error changing password as an admin for a user (v0.91) #1089

forestvogo opened this issue Jan 21, 2022 · 8 comments · Fixed by #1099

Comments

@forestvogo
Copy link

Baikal version: 0.91

Expected behaviour: Adminstrator should be able to set a new password for the user

Current behaviour: Error message is shown as follows:

ErrorException: PDO::quote(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/baikal/Core/Frameworks/Flake/Core/Database.php:204
Stack trace:
#0 [internal function]: Baikal\Framework::exception_error_handler()
#1 /var/www/baikal/Core/Frameworks/Flake/Core/Database.php(204): PDO->quote()
#2 /var/www/baikal/Core/Frameworks/Flake/Core/Database.php(169): Flake\Core\Database->quote()
#3 /var/www/baikal/Core/Frameworks/Flake/Core/Database.php(181): Flake\Core\Database->fullQuote()
#4 /var/www/baikal/Core/Frameworks/Flake/Core/Database.php(81): Flake\Core\Database->fullQuoteArray()
#5 /var/www/baikal/Core/Frameworks/Flake/Core/Database.php(73): Flake\Core\Database->UPDATEquery()
#6 /var/www/baikal/Core/Frameworks/Flake/Core/Model/Db.php(101): Flake\Core\Database->exec_UPDATEquery()
#7 /var/www/baikal/Core/Frameworks/Baikal/Model/User.php(134): Flake\Core\Model\Db->persist()
#8 /var/www/baikal/Core/Frameworks/Formal/Form.php(226): Baikal\Model\User->persist()
#9 /var/www/baikal/Core/Frameworks/BaikalAdmin/Controller/Users.php(126): Formal\Form->execute()
#10 /var/www/baikal/Core/Frameworks/BaikalAdmin/Controller/Users.php(45): BaikalAdmin\Controller\Users->actionEdit()
#11 /var/www/baikal/Core/Frameworks/Flake/Core/Render/Container.php(62): BaikalAdmin\Controller\Users->execute()
#12 /var/www/baikal/Core/Frameworks/Flake/Controller/Page.php(88): Flake\Core\Render\Container->execute()
#13 /var/www/baikal/html/admin/index.php(90): Flake\Controller\Page->render()
#14 {main}

Steps to reproduce:

  1. Login as an admin
  2. Go to "Users and resources
  3. Click on "Edit" of a user
  4. Enter a new password for the user
  5. Retype the new password for the user (confirmation)
  6. Click Save changes
  7. Error message appears (Firefox + Chrome) -> Password is not changed
@ByteHamster
Copy link
Member

What php version are you using? It seems to work fine on my 8.1.1 installation.

@forestvogo
Copy link
Author

Hi @ByteHamster ,

I do use the docker version "https://hub.docker.com/r/ckulka/baikal" of Baikal. Guess maybe here is the problem?

Best regards
Volker

@forestvogo
Copy link
Author

forestvogo commented Jan 23, 2022

I Guess it is "Release 0.9.1 with PHP 8.0 ckulka/baikal-docker#52" and maybe that is the problem here?

@ckulka
Copy link

ckulka commented Jan 25, 2022

The Docker image of 0.9.1 comes with PHP 8.1.1 as well:

$ docker run --rm -it ckulka/baikal:0.9.1 php --version
PHP 8.1.1 (cli) (built: Dec 21 2021 19:41:31) (NTS)
Copyright (c) The PHP Group
    Zend Engine v4.1.1, Copyright (c) Zend Technologies

$ docker run --rm -it ckulka/baikal:0.9.1 php --re pdo | head -1
Extension [ <persistent> extension #20 PDO version 8.1.1 ] {

$ docker run --rm -it ckulka/baikal:0.9.1 php --re pdo_mysql | head -1
Extension [ <persistent> extension #33 pdo_mysql version 8.1.1 ] {

@forestvogo, can you please try ckulka/baikal:experimental-php8.0 or ckulka/baikal:experimental-nginx-php8.0 and see if that fixes your issue? Those images use PHP 8.0 and I'd like to rule out it's a PHP 8.1 related issue.

Edit: the images were published as ckulka/baikal:0.9.1-php8.0 and ckulka/baikal:0.9.1-nginx-php8.0.

@forestvogo
Copy link
Author

@ckulka 👍 Will do and get back to you soon with the result.

@forestvogo
Copy link
Author

forestvogo commented Feb 9, 2022

@ckulka : Forget my last message (already deleted it). With the experimental Image changing the password was a success:
Screenshot 2022-02-09 174517

Does that help you to analyse further?

@ckulka
Copy link

ckulka commented Feb 9, 2022

I'd say it helped, yes: as far as I can tell from your two attemps, your issue only appears in PHP 8.1 but not with PHP 8.0, so at least you have a working instance now.

As far as "why" goes, I'm not familiar enough with PHP to know what other differences or dependencies could cause the different behaviour between PHP 8.1.1 in the container that fails (the details I posted above) and PHP 8.1.1 that @ByteHamster (and others probably too) have success with.

If I had to guess, I think that sabre-io/vobject#561 could fix the issue - like you already alluded to in #1089 (comment), the error messages look the same.

@ByteHamster
Copy link
Member

Weird. I can reproduce the same stack trace on another screen (calendar settings page) but still not on the user settings page. The code in #1099 fixes the error message on my calendar settings page and I am pretty sure it will also fix the problem on your user settings page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants