Skip to content

improve imagick, bcmath and gmp extension warnings - #31470

Merged
skjnldsv merged 2 commits into
masterfrom
enh/13099/allow-disable-imagick-warning
Mar 8, 2022
Merged

improve imagick, bcmath and gmp extension warnings#31470
skjnldsv merged 2 commits into
masterfrom
enh/13099/allow-disable-imagick-warning

Conversation

@szaimen

@szaimenszaimen commented Mar 5, 2022

Copy link
Copy Markdown
Contributor

Fix part of #13099
Fix#22849

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

@szaimenszaimen added this to the Nextcloud 24 milestone Mar 5, 2022
@szaimen
szaimenforce-pushed the enh/13099/allow-disable-imagick-warning branch from d5010ae to 7aab8d8CompareMarch 5, 2022 19:50
@MichaIng

MichaIng commented Mar 6, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Member

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

@szaimenszaimen changed the title allow to disable the imagick warning in setup checkimprove imagick, bcmath and gmp extension warningsMar 7, 2022
@szaimen

Copy link
Copy Markdown
ContributorAuthor

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

@szaimenszaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews bug labels Mar 7, 2022
Comment threadcore/js/setupchecks.js Outdated
Comment threadcore/js/setupchecks.js Outdated
Comment threadcore/js/setupchecks.js Outdated
@MichaIng

Copy link
Copy Markdown
Member

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
szaimenforce-pushed the enh/13099/allow-disable-imagick-warning branch from d8fbd7c to 7dca146CompareMarch 7, 2022 16:35

@MichaIngMichaIng left a comment

Copy link
Copy Markdown
Member

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 skjnldsvMarch 7, 2022 19:44
@szaimen

Copy link
Copy Markdown
ContributorAuthor

Tests are fixed :)

@szaimenszaimen 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 PytalMarch 7, 2022 22:31

@skjnldsvskjnldsv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@skjnldsvskjnldsv 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 masterMar 8, 2022
@skjnldsv
skjnldsv deleted the enh/13099/allow-disable-imagick-warning branch March 8, 2022 07:53
@MichaIng

Copy link
Copy Markdown
Member

/backport to stable23

Probably? 🙂

@szaimen

szaimen commented Mar 20, 2022

Copy link
Copy Markdown
ContributorAuthor

/backport to stable23

Probably? 🙂

Not sure. @skjnldsv?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishenhancement

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

@szaimen@MichaIng@skjnldsv