2014-02-03 06:48:17 -05:00
/ *
* Copyright ( c ) 2014
*
* This file is licensed under the Affero General Public License version 3
* or later .
*
* See the COPYING - README file .
*
* /
( function ( ) {
OC . SetupChecks = {
2015-07-29 10:41:22 -04:00
/* Message types */
MESSAGE _TYPE _INFO : 0 ,
MESSAGE _TYPE _WARNING : 1 ,
MESSAGE _TYPE _ERROR : 2 ,
2014-02-03 06:48:17 -05:00
/ * *
* Check whether the WebDAV connection works .
*
* @ return $ . Deferred object resolved with an array of error messages
* /
checkWebDAV : function ( ) {
var deferred = $ . Deferred ( ) ;
var afterCall = function ( xhr ) {
var messages = [ ] ;
if ( xhr . status !== 207 && xhr . status !== 401 ) {
2015-07-29 11:40:42 -04:00
messages . push ( {
2017-11-14 20:53:47 -05:00
msg : t ( 'core' , 'Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.' ) ,
2015-07-29 11:40:42 -04:00
type : OC . SetupChecks . MESSAGE _TYPE _ERROR
} ) ;
2014-02-03 06:48:17 -05:00
}
deferred . resolve ( messages ) ;
} ;
$ . ajax ( {
type : 'PROPFIND' ,
url : OC . linkToRemoteBase ( 'webdav' ) ,
data : '<?xml version="1.0"?>' +
'<d:propfind xmlns:d="DAV:">' +
'<d:prop><d:resourcetype/></d:prop>' +
'</d:propfind>' ,
2020-02-21 16:13:49 -05:00
contentType : 'application/xml; charset=utf-8' ,
2015-12-10 12:08:40 -05:00
complete : afterCall ,
allowAuthErrors : true
2014-02-03 06:48:17 -05:00
} ) ;
return deferred . promise ( ) ;
} ,
2016-01-08 16:32:11 -05:00
/ * *
* Check whether the . well - known URLs works .
*
* @ param url the URL to test
2019-05-14 05:14:29 -04:00
* @ param placeholderUrl the placeholder URL - can be found at OC . theme . docPlaceholderUrl
2016-01-12 03:53:23 -05:00
* @ param { boolean } runCheck if this is set to false the check is skipped and no error is returned
2018-12-18 13:53:18 -05:00
* @ param { int | int [ ] } expectedStatus the expected HTTP status to be returned by the URL , 207 by default
2016-01-08 16:32:11 -05:00
* @ return $ . Deferred object resolved with an array of error messages
* /
2020-12-14 09:56:07 -05:00
checkWellKnownUrl : function ( verb , url , placeholderUrl , runCheck , expectedStatus , checkCustomHeader ) {
2018-10-10 07:33:57 -04:00
if ( expectedStatus === undefined ) {
2018-12-18 13:53:18 -05:00
expectedStatus = [ 207 ] ;
}
if ( ! Array . isArray ( expectedStatus ) ) {
expectedStatus = [ expectedStatus ] ;
2018-10-10 07:33:57 -04:00
}
2016-01-08 16:32:11 -05:00
var deferred = $ . Deferred ( ) ;
2016-01-12 03:53:23 -05:00
if ( runCheck === false ) {
deferred . resolve ( [ ] ) ;
return deferred . promise ( ) ;
}
2016-01-08 16:32:11 -05:00
var afterCall = function ( xhr ) {
var messages = [ ] ;
2020-12-14 09:56:07 -05:00
var customWellKnown = xhr . getResponseHeader ( 'X-NEXTCLOUD-WELL-KNOWN' )
if ( expectedStatus . indexOf ( xhr . status ) === - 1 || ( checkCustomHeader && ! customWellKnown ) ) {
2016-01-08 16:32:11 -05:00
var docUrl = placeholderUrl . replace ( 'PLACEHOLDER' , 'admin-setup-well-known-URL' ) ;
messages . push ( {
2021-03-01 14:09:44 -05:00
msg : t ( 'core' , 'Your web server is not properly set up to resolve "{url}". Further information can be found in the {linkstart}documentation ↗{linkend}.' , { url : url } )
. replace ( '{linkstart}' , '<a target="_blank" rel="noreferrer noopener" class="external" href="' + docUrl + '">' )
. replace ( '{linkend}' , '</a>' ) ,
2016-01-12 03:15:57 -05:00
type : OC . SetupChecks . MESSAGE _TYPE _INFO
2016-01-08 16:32:11 -05:00
} ) ;
}
deferred . resolve ( messages ) ;
} ;
$ . ajax ( {
2020-12-14 09:56:07 -05:00
type : verb ,
2016-01-08 16:32:11 -05:00
url : url ,
2016-06-23 05:54:49 -04:00
complete : afterCall ,
allowAuthErrors : true
2016-01-08 16:32:11 -05:00
} ) ;
return deferred . promise ( ) ;
} ,
2019-02-19 16:20:33 -05:00
/ * *
* Check whether the . well - known URLs works .
*
* @ param url the URL to test
2019-05-14 05:14:29 -04:00
* @ param placeholderUrl the placeholder URL - can be found at OC . theme . docPlaceholderUrl
2019-02-19 16:20:33 -05:00
* @ param { boolean } runCheck if this is set to false the check is skipped and no error is returned
*
* @ return $ . Deferred object resolved with an array of error messages
* /
checkProviderUrl : function ( url , placeholderUrl , runCheck ) {
var expectedStatus = [ 200 ] ;
var deferred = $ . Deferred ( ) ;
if ( runCheck === false ) {
deferred . resolve ( [ ] ) ;
return deferred . promise ( ) ;
}
var afterCall = function ( xhr ) {
var messages = [ ] ;
if ( expectedStatus . indexOf ( xhr . status ) === - 1 ) {
2019-02-20 04:54:39 -05:00
var docUrl = placeholderUrl . replace ( 'PLACEHOLDER' , 'admin-nginx' ) ;
2019-02-19 16:20:33 -05:00
messages . push ( {
2021-03-01 14:09:44 -05:00
msg : t ( 'core' , 'Your web server is not properly set up to resolve "{url}". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it\'s {linkstart}documentation page ↗{linkend}. On Nginx those are typically the lines starting with "location ~" that need an update.' , { docLink : docUrl , url : url } )
. replace ( '{linkstart}' , '<a target="_blank" rel="noreferrer noopener" class="external" href="' + docUrl + '">' )
. replace ( '{linkend}' , '</a>' ) ,
2019-02-20 04:54:39 -05:00
type : OC . SetupChecks . MESSAGE _TYPE _WARNING
2019-02-19 16:20:33 -05:00
} ) ;
}
deferred . resolve ( messages ) ;
} ;
$ . ajax ( {
type : 'GET' ,
url : url ,
complete : afterCall ,
allowAuthErrors : true
} ) ;
return deferred . promise ( ) ;
} ,
2018-11-29 11:01:43 -05:00
/ * *
* Check whether the WOFF2 URLs works .
*
* @ param url the URL to test
2019-05-14 05:14:29 -04:00
* @ param placeholderUrl the placeholder URL - can be found at OC . theme . docPlaceholderUrl
2018-11-29 11:01:43 -05:00
* @ return $ . Deferred object resolved with an array of error messages
* /
checkWOFF2Loading : function ( url , placeholderUrl ) {
var deferred = $ . Deferred ( ) ;
var afterCall = function ( xhr ) {
var messages = [ ] ;
if ( xhr . status !== 200 ) {
var docUrl = placeholderUrl . replace ( 'PLACEHOLDER' , 'admin-nginx' ) ;
messages . push ( {
2021-03-01 14:09:44 -05:00
msg : t ( 'core' , 'Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our {linkstart}documentation ↗{linkend}.' , { docLink : docUrl , url : url } )
. replace ( '{linkstart}' , '<a target="_blank" rel="noreferrer noopener" class="external" href="' + docUrl + '">' )
. replace ( '{linkend}' , '</a>' ) ,
2018-11-29 11:01:43 -05:00
type : OC . SetupChecks . MESSAGE _TYPE _WARNING
} ) ;
}
deferred . resolve ( messages ) ;
} ;
$ . ajax ( {
type : 'GET' ,
url : url ,
complete : afterCall ,
allowAuthErrors : true
} ) ;
return deferred . promise ( ) ;
} ,
2014-02-03 06:48:17 -05:00
/ * *
* Runs setup checks on the server side
*
* @ return $ . Deferred object resolved with an array of error messages
* /
checkSetup : function ( ) {
var deferred = $ . Deferred ( ) ;
var afterCall = function ( data , statusText , xhr ) {
var messages = [ ] ;
if ( xhr . status === 200 && data ) {
2021-04-23 16:19:08 -04:00
if ( window . location . protocol === 'https:' && data . reverseProxyGeneratedURL . split ( '/' ) [ 0 ] !== 'https:' ) {
2019-10-26 09:12:46 -04:00
messages . push ( {
2021-03-01 14:09:44 -05:00
msg : t ( 'core' , 'You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read {linkstart}the documentation page about this ↗{linkend}.' )
. replace ( '{linkstart}' , '<a target="_blank" rel="noreferrer noopener" class="external" href="' + data . reverseProxyDocs + '">' )
. replace ( '{linkend}' , '</a>' ) ,
2019-03-08 07:36:11 -05:00
type : OC . SetupChecks . MESSAGE _TYPE _WARNING
} )
}
2023-10-09 11:08:59 -04:00
if ( Object . keys ( data . generic ) . length > 0 ) {
Object . keys ( data . generic ) . forEach ( function ( key ) {
Object . keys ( data . generic [ key ] ) . forEach ( function ( title ) {
if ( data . generic [ key ] [ title ] . severity != 'success' ) {
data . generic [ key ] [ title ] . pass = false ;
OC . SetupChecks . addGenericSetupCheck ( data . generic [ key ] , title , messages ) ;
}
} ) ;
} ) ;
}
2014-02-03 06:48:17 -05:00
} else {
2015-07-29 11:40:42 -04:00
messages . push ( {
msg : t ( 'core' , 'Error occurred while checking server setup' ) ,
type : OC . SetupChecks . MESSAGE _TYPE _ERROR
} ) ;
2014-02-03 06:48:17 -05:00
}
deferred . resolve ( messages ) ;
} ;
$ . ajax ( {
type : 'GET' ,
2015-12-10 12:08:40 -05:00
url : OC . generateUrl ( 'settings/ajax/checksetup' ) ,
allowAuthErrors : true
2014-02-03 06:48:17 -05:00
} ) . then ( afterCall , afterCall ) ;
return deferred . promise ( ) ;
2015-01-19 05:56:04 -05:00
} ,
2024-01-11 06:18:25 -05:00
escapeHTML : function ( text ) {
return text . toString ( )
. split ( '&' ) . join ( '&' )
. split ( '<' ) . join ( '<' )
. split ( '>' ) . join ( '>' )
. split ( '"' ) . join ( '"' )
. split ( '\'' ) . join ( ''' )
} ,
2024-01-09 10:43:46 -05:00
/ * *
* @ param message The message string containing placeholders .
* @ param parameters An object with keys as placeholders and values as their replacements .
*
* @ return The message with placeholders replaced by values .
* /
richToParsed : function ( message , parameters ) {
for ( var [ placeholder , parameter ] of Object . entries ( parameters ) ) {
var replacement ;
if ( parameter . type === 'user' ) {
2024-01-11 06:18:25 -05:00
replacement = '@' + this . escapeHTML ( parameter . name ) ;
2024-01-09 10:43:46 -05:00
} else if ( parameter . type === 'file' ) {
2024-01-11 06:18:25 -05:00
replacement = this . escapeHTML ( parameter . path ) || this . escapeHTML ( parameter . name ) ;
} else if ( parameter . type === 'highlight' ) {
replacement = '<a href="' + encodeURI ( parameter . link ) + '">' + this . escapeHTML ( parameter . name ) + '</a>' ;
2024-01-09 10:43:46 -05:00
} else {
2024-01-11 06:18:25 -05:00
replacement = this . escapeHTML ( parameter . name ) ;
2024-01-09 10:43:46 -05:00
}
message = message . replace ( '{' + placeholder + '}' , replacement ) ;
}
return message ;
} ,
2020-07-25 15:53:39 -04:00
addGenericSetupCheck : function ( data , check , messages ) {
2023-10-09 11:08:59 -04:00
var setupCheck = data [ check ] || { pass : true , description : '' , severity : 'info' , linkToDoc : null }
2020-07-25 15:53:39 -04:00
2020-08-07 11:34:03 -04:00
var type = OC . SetupChecks . MESSAGE _TYPE _INFO
2020-07-25 15:53:39 -04:00
if ( setupCheck . severity === 'warning' ) {
type = OC . SetupChecks . MESSAGE _TYPE _WARNING
} else if ( setupCheck . severity === 'error' ) {
type = OC . SetupChecks . MESSAGE _TYPE _ERROR
}
2020-08-12 09:16:33 -04:00
var message = setupCheck . description ;
2024-01-11 06:18:25 -05:00
if ( message ) {
message = this . escapeHTML ( message )
}
2024-01-09 10:43:46 -05:00
if ( setupCheck . descriptionParameters ) {
message = this . richToParsed ( message , setupCheck . descriptionParameters ) ;
}
2023-10-09 11:08:59 -04:00
if ( setupCheck . linkToDoc ) {
2021-03-01 14:09:44 -05:00
message += ' ' + t ( 'core' , 'For more details see the {linkstart}documentation ↗{linkend}.' )
2023-10-09 11:08:59 -04:00
. replace ( '{linkstart}' , '<a target="_blank" rel="noreferrer noopener" class="external" href="' + setupCheck . linkToDoc + '">' )
2021-03-01 14:09:44 -05:00
. replace ( '{linkend}' , '</a>' ) ;
2020-08-12 09:16:33 -04:00
}
2020-11-02 18:00:05 -05:00
if ( setupCheck . elements ) {
message += '<br><ul>'
setupCheck . elements . forEach ( function ( element ) {
message += '<li>' ;
message += element
message += '</li>' ;
} ) ;
message += '</ul>'
}
2020-08-12 09:16:33 -04:00
2020-07-25 15:53:39 -04:00
if ( ! setupCheck . pass ) {
messages . push ( {
2020-08-12 09:16:33 -04:00
msg : message ,
2020-07-25 15:53:39 -04:00
type : type ,
} )
}
} ,
2015-01-19 05:56:04 -05:00
/ * *
* Runs generic checks on the server side , the difference to dedicated
* methods is that we use the same XHR object for all checks to save
* requests .
*
* @ return $ . Deferred object resolved with an array of error messages
* /
checkGeneric : function ( ) {
var self = this ;
var deferred = $ . Deferred ( ) ;
var afterCall = function ( data , statusText , xhr ) {
var messages = [ ] ;
messages = messages . concat ( self . _checkSecurityHeaders ( xhr ) ) ;
messages = messages . concat ( self . _checkSSL ( xhr ) ) ;
deferred . resolve ( messages ) ;
} ;
$ . ajax ( {
type : 'GET' ,
2015-12-10 12:08:40 -05:00
url : OC . generateUrl ( 'heartbeat' ) ,
allowAuthErrors : true
2015-01-19 05:56:04 -05:00
} ) . then ( afterCall , afterCall ) ;
return deferred . promise ( ) ;
} ,
2016-02-01 12:14:10 -05:00
checkDataProtected : function ( ) {
var deferred = $ . Deferred ( ) ;
if ( oc _dataURL === false ) {
return deferred . resolve ( [ ] ) ;
}
var afterCall = function ( xhr ) {
var messages = [ ] ;
2016-12-05 11:09:23 -05:00
// .ocdata is an empty file in the data directory - if this is readable then the data dir is not protected
if ( xhr . status === 200 && xhr . responseText === '' ) {
2016-02-01 12:14:10 -05:00
messages . push ( {
2021-09-16 10:16:27 -04:00
msg : t ( 'core' , 'Your data directory and files are probably accessible from the internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.' ) ,
2016-02-01 12:14:10 -05:00
type : OC . SetupChecks . MESSAGE _TYPE _ERROR
} ) ;
}
deferred . resolve ( messages ) ;
} ;
$ . ajax ( {
type : 'GET' ,
2016-12-05 11:09:23 -05:00
url : OC . linkTo ( '' , oc _dataURL + '/.ocdata?t=' + ( new Date ( ) ) . getTime ( ) ) ,
2016-06-23 05:54:49 -04:00
complete : afterCall ,
allowAuthErrors : true
2016-02-01 12:14:10 -05:00
} ) ;
return deferred . promise ( ) ;
} ,
2015-01-19 05:56:04 -05:00
/ * *
* Runs check for some generic security headers on the server side
*
* @ param { Object } xhr
* @ return { Array } Array with error messages
* /
_checkSecurityHeaders : function ( xhr ) {
var messages = [ ] ;
if ( xhr . status === 200 ) {
var securityHeaders = {
2017-05-13 14:54:08 -04:00
'X-Content-Type-Options' : [ 'nosniff' ] ,
2023-02-13 08:09:13 -05:00
'X-Robots-Tag' : [ 'noindex, nofollow' ] ,
2017-05-13 14:54:08 -04:00
'X-Frame-Options' : [ 'SAMEORIGIN' , 'DENY' ] ,
'X-Permitted-Cross-Domain-Policies' : [ 'none' ] ,
2015-01-19 05:56:04 -05:00
} ;
for ( var header in securityHeaders ) {
2017-05-13 14:54:08 -04:00
var option = securityHeaders [ header ] [ 0 ] ;
2023-02-13 08:09:13 -05:00
if ( ! xhr . getResponseHeader ( header ) || xhr . getResponseHeader ( header ) . replace ( /, / , ',' ) . toLowerCase ( ) !== option . replace ( /, / , ',' ) . toLowerCase ( ) ) {
2017-11-14 20:53:47 -05:00
var msg = t ( 'core' , 'The "{header}" HTTP header is not set to "{expected}". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.' , { header : header , expected : option } ) ;
2017-05-13 14:54:08 -04:00
if ( xhr . getResponseHeader ( header ) && securityHeaders [ header ] . length > 1 && xhr . getResponseHeader ( header ) . toLowerCase ( ) === securityHeaders [ header ] [ 1 ] . toLowerCase ( ) ) {
2017-11-14 20:53:47 -05:00
msg = t ( 'core' , 'The "{header}" HTTP header is not set to "{expected}". Some features might not work correctly, as it is recommended to adjust this setting accordingly.' , { header : header , expected : option } ) ;
2017-05-13 14:54:08 -04:00
}
2015-07-29 11:40:42 -04:00
messages . push ( {
2017-05-13 14:54:08 -04:00
msg : msg ,
2015-07-29 11:40:42 -04:00
type : OC . SetupChecks . MESSAGE _TYPE _WARNING
} ) ;
2015-01-19 05:56:04 -05:00
}
}
2018-06-02 15:29:36 -04:00
2018-10-17 09:13:52 -04:00
var xssfields = xhr . getResponseHeader ( 'X-XSS-Protection' ) ? xhr . getResponseHeader ( 'X-XSS-Protection' ) . split ( ';' ) . map ( function ( item ) { return item . trim ( ) ; } ) : [ ] ;
2018-10-17 08:28:51 -04:00
if ( xssfields . length === 0 || xssfields . indexOf ( '1' ) === - 1 || xssfields . indexOf ( 'mode=block' ) === - 1 ) {
messages . push ( {
2022-09-17 13:51:11 -04:00
msg : t ( 'core' , 'The "{header}" HTTP header does not contain "{expected}". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.' ,
2018-10-17 08:28:51 -04:00
{
header : 'X-XSS-Protection' ,
expected : '1; mode=block'
} ) ,
type : OC . SetupChecks . MESSAGE _TYPE _WARNING
} ) ;
}
2020-02-26 17:14:38 -05:00
const referrerPolicy = xhr . getResponseHeader ( 'Referrer-Policy' )
if ( referrerPolicy === null || ! /(no-referrer(-when-downgrade)?|strict-origin(-when-cross-origin)?|same-origin)(,|$)/ . test ( referrerPolicy ) ) {
2018-06-02 15:29:36 -04:00
messages . push ( {
2021-03-01 14:09:44 -05:00
msg : t ( 'core' , 'The "{header}" HTTP header is not set to "{val1}", "{val2}", "{val3}", "{val4}" or "{val5}". This can leak referer information. See the {linkstart}W3C Recommendation ↗{linkend}.' ,
2018-06-02 15:29:36 -04:00
{
header : 'Referrer-Policy' ,
val1 : 'no-referrer' ,
val2 : 'no-referrer-when-downgrade' ,
val3 : 'strict-origin' ,
val4 : 'strict-origin-when-cross-origin' ,
2021-03-01 14:09:44 -05:00
val5 : 'same-origin'
} )
. replace ( '{linkstart}' , '<a target="_blank" rel="noreferrer noopener" class="external" href="https://www.w3.org/TR/referrer-policy/">' )
. replace ( '{linkend}' , '</a>' ) ,
2018-06-02 15:29:36 -04:00
type : OC . SetupChecks . MESSAGE _TYPE _INFO
2020-02-26 17:14:38 -05:00
} )
2018-06-02 15:29:36 -04:00
}
2015-01-19 05:56:04 -05:00
} else {
2015-07-29 11:40:42 -04:00
messages . push ( {
msg : t ( 'core' , 'Error occurred while checking server setup' ) ,
type : OC . SetupChecks . MESSAGE _TYPE _ERROR
} ) ;
2015-01-19 05:56:04 -05:00
}
return messages ;
} ,
/ * *
* Runs check for some SSL configuration issues on the server side
*
* @ param { Object } xhr
* @ return { Array } Array with error messages
* /
_checkSSL : function ( xhr ) {
var messages = [ ] ;
if ( xhr . status === 200 ) {
2019-05-14 05:14:29 -04:00
var tipsUrl = OC . theme . docPlaceholderUrl . replace ( 'PLACEHOLDER' , 'admin-security' ) ;
2015-01-19 05:56:04 -05:00
if ( OC . getProtocol ( ) === 'https' ) {
// Extract the value of 'Strict-Transport-Security'
var transportSecurityValidity = xhr . getResponseHeader ( 'Strict-Transport-Security' ) ;
if ( transportSecurityValidity !== null && transportSecurityValidity . length > 8 ) {
var firstComma = transportSecurityValidity . indexOf ( ";" ) ;
if ( firstComma !== - 1 ) {
2015-06-15 04:39:25 -04:00
transportSecurityValidity = transportSecurityValidity . substring ( 8 , firstComma ) ;
2015-01-19 05:56:04 -05:00
} else {
transportSecurityValidity = transportSecurityValidity . substring ( 8 ) ;
}
}
2016-04-13 02:40:49 -04:00
var minimumSeconds = 15552000 ;
2015-06-15 04:39:25 -04:00
if ( isNaN ( transportSecurityValidity ) || transportSecurityValidity <= ( minimumSeconds - 1 ) ) {
2015-07-29 11:40:42 -04:00
messages . push ( {
2021-03-01 14:09:44 -05:00
msg : t ( 'core' , 'The "Strict-Transport-Security" HTTP header is not set to at least "{seconds}" seconds. For enhanced security, it is recommended to enable HSTS as described in the {linkstart}security tips ↗{linkend}.' , { 'seconds' : minimumSeconds } )
. replace ( '{linkstart}' , '<a target="_blank" rel="noreferrer noopener" class="external" href="' + tipsUrl + '">' )
. replace ( '{linkend}' , '</a>' ) ,
2015-07-29 11:40:42 -04:00
type : OC . SetupChecks . MESSAGE _TYPE _WARNING
} ) ;
2015-01-19 05:56:04 -05:00
}
2023-03-21 17:50:08 -04:00
} else if ( ! /(?:^(?:localhost|127\.0\.0\.1|::1)|\.onion)$/ . exec ( window . location . hostname ) ) {
2015-07-29 11:40:42 -04:00
messages . push ( {
2023-06-20 16:54:48 -04:00
msg : t ( 'core' , 'Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the {linkstart}security tips ↗{linkend}. Without it some important web functionality like "copy to clipboard" or "service workers" will not work!' )
2021-03-01 14:09:44 -05:00
. replace ( '{linkstart}' , '<a target="_blank" rel="noreferrer noopener" class="external" href="' + tipsUrl + '">' )
. replace ( '{linkend}' , '</a>' ) ,
2023-06-20 16:54:48 -04:00
type : OC . SetupChecks . MESSAGE _TYPE _ERROR
2015-07-29 11:40:42 -04:00
} ) ;
2015-01-19 05:56:04 -05:00
}
} else {
2015-07-29 11:40:42 -04:00
messages . push ( {
msg : t ( 'core' , 'Error occurred while checking server setup' ) ,
type : OC . SetupChecks . MESSAGE _TYPE _ERROR
} ) ;
2015-01-19 05:56:04 -05:00
}
return messages ;
2014-02-03 06:48:17 -05:00
}
} ;
} ) ( ) ;