summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2018-09-13 09:29:42 +0200
committerGitHub <noreply@github.com>2018-09-13 09:29:42 +0200
commita1c969a17056f14fd165642f6c19cad160e32212 (patch)
treec4da5745f4ab7909481bcf4f29f92f5eaca2347c /core/js
parent10351cb9daaae22c7d6b5c57299198987e2b3316 (diff)
parent8d8189c9321ebc4b7049e6060a4d2e3611051aea (diff)
downloadnextcloud-server-a1c969a17056f14fd165642f6c19cad160e32212.tar.gz
nextcloud-server-a1c969a17056f14fd165642f6c19cad160e32212.zip
Merge pull request #10840 from webfoersterei/refactor/5530-urandom-check
Refactor secure randomness check
Diffstat (limited to 'core/js')
-rw-r--r--core/js/setupchecks.js6
-rw-r--r--core/js/tests/specs/setupchecksSpec.js30
2 files changed, 18 insertions, 18 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index 628606a9e5b..62f0fb10c10 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -183,10 +183,10 @@
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
- if(!data.isUrandomAvailable) {
+ if(!data.isRandomnessSecure) {
messages.push({
- msg: t('core', '/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.securityDocs}),
- type: OC.SetupChecks.MESSAGE_TYPE_WARNING
+ msg: t('core', 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.securityDocs}),
+ type: OC.SetupChecks.MESSAGE_TYPE_ERROR
});
}
if(data.isUsedTlsLibOutdated) {
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index 4c0545b7b4f..41bed276b6f 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -155,7 +155,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
serverHasInternetConnection: false,
memcacheDocs: 'https://docs.nextcloud.com/server/go.php?to=admin-performance',
forwardedForHeadersWorking: true,
@@ -204,7 +204,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
serverHasInternetConnection: false,
memcacheDocs: 'https://docs.nextcloud.com/server/go.php?to=admin-performance',
forwardedForHeadersWorking: true,
@@ -254,7 +254,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
serverHasInternetConnection: false,
isMemcacheConfigured: true,
forwardedForHeadersWorking: true,
@@ -301,7 +301,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: false,
+ isRandomnessSecure: false,
securityDocs: 'https://docs.owncloud.org/myDocs.html',
serverHasInternetConnection: true,
isMemcacheConfigured: true,
@@ -325,8 +325,8 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: '/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in the <a href="https://docs.owncloud.org/myDocs.html" rel="noreferrer noopener">documentation</a>.',
- type: OC.SetupChecks.MESSAGE_TYPE_WARNING
+ msg: 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the <a href="https://docs.owncloud.org/myDocs.html" rel="noreferrer noopener">documentation</a>.',
+ type: OC.SetupChecks.MESSAGE_TYPE_ERROR
}]);
done();
});
@@ -347,7 +347,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
securityDocs: 'https://docs.owncloud.org/myDocs.html',
serverHasInternetConnection: true,
isMemcacheConfigured: true,
@@ -393,7 +393,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
securityDocs: 'https://docs.owncloud.org/myDocs.html',
serverHasInternetConnection: true,
isMemcacheConfigured: true,
@@ -441,7 +441,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
serverHasInternetConnection: true,
isMemcacheConfigured: true,
forwardedForHeadersWorking: false,
@@ -487,7 +487,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
serverHasInternetConnection: true,
isMemcacheConfigured: true,
forwardedForHeadersWorking: true,
@@ -533,7 +533,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
serverHasInternetConnection: true,
isMemcacheConfigured: true,
forwardedForHeadersWorking: true,
@@ -599,7 +599,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
securityDocs: 'https://docs.owncloud.org/myDocs.html',
serverHasInternetConnection: true,
isMemcacheConfigured: true,
@@ -646,7 +646,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
securityDocs: 'https://docs.owncloud.org/myDocs.html',
serverHasInternetConnection: true,
isMemcacheConfigured: true,
@@ -693,7 +693,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
securityDocs: 'https://docs.owncloud.org/myDocs.html',
serverHasInternetConnection: true,
isMemcacheConfigured: true,
@@ -740,7 +740,7 @@ describe('OC.SetupChecks tests', function() {
hasWorkingFileLocking: true,
hasValidTransactionIsolationLevel: true,
suggestedOverwriteCliURL: '',
- isUrandomAvailable: true,
+ isRandomnessSecure: true,
securityDocs: 'https://docs.owncloud.org/myDocs.html',
serverHasInternetConnection: true,
isMemcacheConfigured: true,