-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: show alert about ioc scanner to all customers on upgrade #41137
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
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
jnweiger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI build is failing in php-style step:
.................... 2399 / 2399 (100%)
Legend: .-no changes, F-fixed, S-skipped (cached or empty file), I-invalid file syntax (file ignored), E-error
1) core/templates/update.admin.php (braces, method_argument_space)
---------- begin diff ----------
--- /drone/src/core/templates/update.admin.php
+++ /drone/src/core/templates/update.admin.php
@@ -1,7 +1,7 @@
<?php $license = \OC::$server->query(\OC\License\LicenseFetcher::class)->getOwncloudLicense();
if ($license !== null) {
-?>
+ ?>
<div class="update">
<?php include('ioc.warning.php'); ?>
</div>
----------- end diff -----------
Found 1 of 2399 files that can be fixed in 58.306 seconds, 50.000 MB memory used
Detected deprecations in use:
- Rule "braces" is deprecated. Use "single_space_around_construct", "control_structure_braces", "control_structure_continuation_position", "declare_parentheses", "no_multiple_statements_per_line", "curly_braces_position", "statement_indentation" and "no_extra_blank_lines" instead.
make: *** [Makefile:222: test-php-style] Error 8
5721849 to
9bd1ff2
Compare
9bd1ff2 to
08f3d15
Compare
|
Works for me on my local dev setup with license key. The link takes me to the ioc-scanner script and PDF with instructions. It runs and produces "good" results (I have core master 10.13.4-prealpha). When I go back to Settings-Admin-General on the webUI, it still shows me all the same "Critical Alert" in red stuff. Would there be some benefit for that screen to know when the scanner was last run, and display that date? Or even display the results summary as well? |
phil-davis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text looks OK.
Following the links from the webUI Settings-Admin-General section works.
Script works as per the PDF instructions for my local case.
There is no automated mechanism planned for this - especially because the tool needs to be executed on all servers. We have no understanding when this will be. |
| $license = \OC::$server->query(LicenseFetcher::class)->getOwncloudLicense(); | ||
| if ($license !== null) { | ||
| $output->setFormatter($defaultFormat); | ||
| $this->printAdvisory($output); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the ILicenseManager seems better. It can also be injected.
if ($licenseManager->getLicenseStateFor('core') !== ILicenseManager::LICENSE_STATE_VALID) {
....
}
not sure if we want to check for additional states though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We explicitly don't care about the license state. License set -> highly probably a customer -> alert them
I'd vote for this, even if it's just an acknowledgement. Something like "I've already applied the patch" and / or "I've read the message" might be good enough. |
|
08f3d15 to
5f10dcb
Compare
jnweiger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a config.php variable that suppresses the messages.
We don't have anything automated that sets this variable after the ioc-scanner was run.
Thus I'd suggest to add a button "I have done this" in the admin view.
And for more feature bloat, maybe the config variable should be automatically reset on/after an upgrade. And maybe it should reset after some time period (maybe every 3 months the alert would "reappear"?) And maybe we don't want/need to design in all this sort of stuff. More importantly, when there is a new/changed ios-scanner script available (that checks for more things, new things), how is that communicated? I suppose that the read-only public link will always have the latest ioc-scanner. But how will an admin know that they should download a newer version and run it? |
|
We want no easy way to click this away. For the time being this will stay this way for 10.13.4. any change will come with future releases. Time is key here..... THX |
|
We need to document the new config.php option |
I guess that this is true/false. Defaults to false. With true making the message go away. We should add this config.php change to this PR! |
According to the code: To suppress the message, the config item has to be set to exactly the literal string "EXECUTED_ON_ALL_NODES". |
181b2e2 to
220c746
Compare
feat: display alert on web updater page feat: add alert to admin settings feat: config to disable alert in admin settings + admin settings styling
220c746 to
6818e47
Compare
|

Description
Display ioc scanner instructions to all customers before upgrade (console as well as web updater) and in admin settings.
Community users will be take care of in future versions ... 😿
How Has This Been Tested?
Display message in upgrade
Display alert in admin section
Screenshots (if appropriate):
Types of changes
Checklist: