summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-10 23:03:35 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-10 23:03:35 +0200
commit9650f3ecbebfc7c7cc30b787acae3490b0f4e6b5 (patch)
tree80d1c50a805bbd0507a8de495caba39e490d5706 /core
parent54aa57b47a9bd8f7e6f2f81f1b229eb19c1e135b (diff)
parent72ba67815ed15aac9d9511504f61f8c5fa73bff4 (diff)
downloadnextcloud-server-9650f3ecbebfc7c7cc30b787acae3490b0f4e6b5.tar.gz
nextcloud-server-9650f3ecbebfc7c7cc30b787acae3490b0f4e6b5.zip
Merge pull request #17919 from rullzer/php_supported_check
Display warning in security & setup warnings if php version is EOL
Diffstat (limited to 'core')
-rw-r--r--core/js/setupchecks.js5
-rw-r--r--core/js/tests/specs/setupchecksSpec.js17
2 files changed, 22 insertions, 0 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index 35f24b188fa..5a5c12c85e6 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -72,6 +72,11 @@
if(data.isUsedTlsLibOutdated) {
messages.push(data.isUsedTlsLibOutdated);
}
+ if(data.phpSupported && data.phpSupported.eol) {
+ messages.push(
+ t('core', 'Your PHP version ({version}) is no longer <a href="{phpLink}">supported by PHP</a>. We encourage you to upgrade your PHP version to take advantage of performance and security updates provided by PHP.', {version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php'})
+ );
+ }
} else {
messages.push(t('core', 'Error occurred while checking server setup'));
}
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index ec8a732b4a1..fe12aa4544c 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -142,6 +142,23 @@ describe('OC.SetupChecks tests', function() {
done();
});
});
+
+ it('should return an error if the php version is no longer supported', function(done) {
+ var async = OC.SetupChecks.checkSetup();
+
+ suite.server.requests[0].respond(
+ 200,
+ {
+ 'Content-Type': 'application/json',
+ },
+ JSON.stringify({isUrandomAvailable: true, securityDocs: 'https://docs.owncloud.org/myDocs.html', serverHasInternetConnection: true, dataDirectoryProtected: true, isMemcacheConfigured: true, phpSupported: {eol: true, version: '5.4.0'}})
+ );
+
+ async.done(function( data, s, x ){
+ expect(data).toEqual(['Your PHP version (5.4.0) is no longer <a href="https://secure.php.net/supported-versions.php">supported by PHP</a>. We encourage you to upgrade your PHP version to take advantage of performance and security updates provided by PHP.']);
+ done();
+ });
+ });
});
describe('checkGeneric', function() {