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

Display warning in security & setup warnings if php version is EOL #17919

Merged
merged 1 commit into from
Aug 10, 2015
Merged

Display warning in security & setup warnings if php version is EOL #17919

merged 1 commit into from
Aug 10, 2015

Conversation

rullzer
Copy link
Contributor

@rullzer rullzer commented Jul 28, 2015

As I suggested in #16428 (comment)

When 8.2 comes out php 5.4 will be End of Life and no longer supported (https://secure.php.net/supported-versions.php). This PR makes sure that we warn admins about this, so they can either upgrade or start complaining to their distro to provider newer packages for PHP. Then at least we did what we could if all of a sudden a huge security exploit in 5.4 is discovered.

CC: @oparoz @DeepDiver1975 @karlitschek @LukasReschke

@@ -69,6 +69,11 @@
t('core', '/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in our <a href="{docLink}">documentation</a>.', {docLink: data.securityDocs})
);
}
if(data.phpSupported && data.phpSupported.eol) {
messages.push(
t('core', 'Your php version ({version}) is no longer supported. See <a href="{phpLink}">php.net</a>. Please upgrade.', {version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php'})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we need to formulate this differently?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that sentence is a little brash 😆 Also, make sure the capitalisation is correct

Perhaps "Your PHP version {{version}} is end-of-life, and may pose a security risk. We strongly recommend updating to a newer version." No link to php.net necessary IMO.

@karlitschek
Copy link
Contributor

Thanks a lot for the effort @rullzer :-)
Unfortunately the decission what is supported by ownCloud is independent from what is supported by the PHP community. Or to use different words: We still have to support 5.4 because it is shipped and supported by key distributions even it support by PHP.net itself is dropped.
So unfortunately 👎 for now
@MTRichards

@oparoz
Copy link
Contributor

oparoz commented Jul 28, 2015

Hmmm, but all these LTS version have a way to upgrade PHP to something more recent.
@karlitschek, Maybe don't show the warning in the EE edition, since ops will know what to do anyway?

@karlitschek
Copy link
Contributor

@oparoz Hmm. Actually no. RHEL lately announced a way to get new php version with support. But others not.
@MTRichards What do you think about PHP 5.4 support ?

@oparoz
Copy link
Contributor

oparoz commented Jul 28, 2015

Ah. If you need a version supported by the OS vendor itself, then probably not.

@RobinMcCorkell
Copy link
Member

@karlitschek I see this as a subtle reminder to admins that they should upgrade from a (potentially insecure) PHP version. ownCloud won't stop working with 5.4, it'll just show this warning. And as we've seen on the forums and elsewhere, people tend to look at the Setup Warnings section a lot more than documentation or release notes 😄

@rullzer
Copy link
Contributor Author

rullzer commented Jul 28, 2015

@karlitschek Indeed I was not planning on dropping PHP 5.4 support (as I know some distro's only ship 5.4). But we should tell people that the version they are using is not maintained and upstream does not support it any longer.

I see this as a way to get the people that can upgrade to upgrade. So that if a security bugs pops up (and lets face it that happens in PHP) less people will be affected.

Admins running owncloud on a distro that only ship 5.4 probably know this (and know the risks). But then again it might give some people more incentive to complain to their distro.

@MTRichards
Copy link
Contributor

Thanks @rullzer - we knew this was coming, good to see the issue here.

My opinion is that an informed admin is a better admin. Assuming an admin knows that PHP 5.x is no longer supported, they can take the proper action for them - stick with overall server OS vendor supported stack, and keep the older version of PHP, or upgrade. At least then they will know.

As this is not about supporting PHP 5.4 with ownCloud for now, since we still support it - rather this is about the challenge of keeping an environment properly updated - I like having a message.

That said, we have to be careful with wording. Current wording makes it sounds like ownCloud don't support your PHP version, that is not quite true. We should consider something like:
"Your PHP version is no longer supported by PHP. We encourage you to upgrade your PHP version to take advantage of performance and security updates provided by PHP."
Or something like that, with the link to PHP.net. Clearly this just shows for admins in the admin panel error message section, I think that is how it is designed above.

@MTRichards
Copy link
Contributor

Is it possible to have a new yellow error message, a caution, rather than a red warning for the message? Then we can adopt the standard error message approach: red=showstopper, yellow=informational but still works, black=nothing to worry about?

@RobinMcCorkell
Copy link
Member

@MTRichards +1 for that, but I fear that's a whole other PR... Perhaps leave this one on standby until we have colours available?

@rullzer
Copy link
Contributor Author

rullzer commented Jul 28, 2015

@MTRichards +1 for that, but I fear that's a whole other PR... Perhaps leave this one on standby until we have colours available?

Agreed. I would make the different colors a separate PR. Should not be hard but best to split it.

@MTRichards
Copy link
Contributor

Agreed. Just getting the updated warning is all good for me.

$eol = true;
}

return ['eol' => $eol, 'version' => phpversion()];
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels so wrong. Use the same way of retrieving the PHP version - either PHP_VERSION or phpversion() but please not mixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

jikes you are right.. that is dirty. Will fix.

@scrutinizer-notifier
Copy link

A new inspection was created.

@ghost
Copy link

ghost commented Jul 29, 2015

🚀 Test PASSed.🚀
chuck

@MorrisJobke
Copy link
Contributor

Tested and works 👍

@DeepDiver1975
Copy link
Member

👍

DeepDiver1975 added a commit that referenced this pull request Aug 10, 2015
Display warning in security & setup warnings if php version is EOL
@DeepDiver1975 DeepDiver1975 merged commit 9650f3e into owncloud:master Aug 10, 2015
@rullzer rullzer deleted the php_supported_check branch August 11, 2015 06:46
@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants