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

improve imagick, bcmath and gmp extension warnings #31470

Merged
merged 2 commits into from
Mar 8, 2022

Conversation

szaimen
Copy link
Contributor

@szaimen szaimen commented Mar 5, 2022

Fix part of #13099
Fix #22849

Signed-off-by: szaimen szaimen@e.mail.de

@szaimen szaimen added this to the Nextcloud 24 milestone Mar 5, 2022
@szaimen szaimen force-pushed the enh/13099/allow-disable-imagick-warning branch from d5010ae to 7aab8d8 Compare March 5, 2022 19:50
@MichaIng
Copy link
Member

MichaIng commented Mar 6, 2022

Not a real solution, but most appliance and NC installer developers will like it, including myself, muting one of the warnings we do not want to address intentionally for our users.

@skjnldsv
Copy link
Member

skjnldsv commented Mar 6, 2022

I'm really not ok with that. Yet again a random hidden config just to tell the admin everything is fine?
The admin should know how to run a nc instance and learn what this warning means and if they can ignore it or not. Adding a config switch for a cosmetic reason is not the way to go imho

@MichaIng
Copy link
Member

MichaIng commented Mar 6, 2022

As much as I would like to mute this for our users, I have to agree with @skjnldsv, but the way the warning shows up currently does not serve the stated intention:

The admin should know how to run a nc instance and learn what this warning means

Then we should rephrase the text from a generic "highly recommended for performance and compatibility" to one that DOES explain what it is really used for. AFAIK it speeds up thumbnail, avatar and possibly other UI image resizing, compared to GD. As this is a one time step until new images are added, IMHO it is not worth it to bloat the PHP instance, considering the open security questions discussed in #13099.

Similar with bcmath and gmp, required for WebAuthn authentication but otherwise unnecessary, so the warnings are currently misleading, IMHO: #22849

@szaimen
Copy link
Contributor Author

szaimen commented Mar 6, 2022

Then we should rephrase the text from a generic "highly recommended for performance and compatibility" to one that DOES explain what it is really used for. AFAIK it speeds up thumbnail, avatar and possibly other UI image resizing, compared to GD. As this is a one time step until new images are added, IMHO it is not worth it to bloat the PHP instance, considering the open security questions discussed in #13099.

Similar with bcmath and gmp, required for WebAuthn authentication but otherwise unnecessary, so the warnings are currently misleading, IMHO: #22849

Sounds good to me. Any pointers how and where to implement this?

@MichaIng
Copy link
Member

MichaIng commented Mar 6, 2022

At best a dedicated function like hasImagickPHPModule(), passing a dedicated DataResponse array entry (bottom of this script), which triggers a dedicated warning in the frontend: https://github.com/nextcloud/server/blob/master/core/js/setupchecks.js

There are a few tests which would need to be adjusted as well, see the changes for OPcache setup checks: https://github.com/nextcloud/server/pull/27403/files

@szaimen szaimen changed the title allow to disable the imagick warning in setup check improve imagick, bcmath and gmp extension warnings Mar 7, 2022
@szaimen
Copy link
Contributor Author

szaimen commented Mar 7, 2022

@MichaIng does 70bd008 look good to you? I will fix the tests afterwards.

@szaimen szaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews bug labels Mar 7, 2022
core/js/setupchecks.js Outdated Show resolved Hide resolved
core/js/setupchecks.js Outdated Show resolved Hide resolved
core/js/setupchecks.js Outdated Show resolved Hide resolved
@MichaIng
Copy link
Member

MichaIng commented Mar 7, 2022

LGTM, aside of some comments I left for message consistency and to make clearer that the two WebAuthn modules are required only when WebAuthn is actually used. IMHO having dedicated messages or each of these optional modules is much better than the previous generic message 👍. That way admins have a better basis to decide whether to ignore the warning or install the modules.

Signed-off-by: szaimen <szaimen@e.mail.de>
Co-Authored-By: MichaIng <micha@dietpi.com>
@szaimen szaimen force-pushed the enh/13099/allow-disable-imagick-warning branch from d8fbd7c to 7dca146 Compare March 7, 2022 16:35
Copy link
Member

@MichaIng MichaIng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, given the tests will be fixed 👍.

Signed-off-by: szaimen <szaimen@e.mail.de>
@szaimen szaimen requested review from skjnldsv and removed request for skjnldsv March 7, 2022 19:44
@szaimen
Copy link
Contributor Author

szaimen commented Mar 7, 2022

Tests are fixed :)

@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress backport-request labels Mar 7, 2022
@szaimen szaimen requested a review from Pytal March 7, 2022 22:31
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Mar 8, 2022
@skjnldsv skjnldsv merged commit 23e8ae1 into master Mar 8, 2022
@skjnldsv skjnldsv deleted the enh/13099/allow-disable-imagick-warning branch March 8, 2022 07:53
@MichaIng
Copy link
Member

/backport to stable23

Probably? 🙂

@szaimen
Copy link
Contributor Author

szaimen commented Mar 20, 2022

/backport to stable23

Probably? 🙂

Not sure. @skjnldsv?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove bcmath and gmp warning if WebAuthn is not used
3 participants