@@ -1490,7 +1490,7 @@ describe('OC.SetupChecks tests', function() {
14901490					msg : 'The "X-Content-Type-Options" HTTP header is not set to "nosniff". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.' , 
14911491					type : OC . SetupChecks . MESSAGE_TYPE_WARNING 
14921492				} ,  { 
1493- 					msg : 'The "X-Robots-Tag" HTTP header is not set to "none ". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.' , 
1493+ 					msg : 'The "X-Robots-Tag" HTTP header is not set to "noindex, nofollow ". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.' , 
14941494					type : OC . SetupChecks . MESSAGE_TYPE_WARNING 
14951495				} ,  { 
14961496					msg : 'The "X-Frame-Options" HTTP header is not set to "SAMEORIGIN". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.' , 
@@ -1517,7 +1517,7 @@ describe('OC.SetupChecks tests', function() {
15171517			suite . server . requests [ 0 ] . respond ( 
15181518				200 , 
15191519				{ 
1520- 					'X-Robots-Tag' : 'none ' , 
1520+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
15211521					'X-Frame-Options' : 'SAMEORIGIN' , 
15221522					'Strict-Transport-Security' : 'max-age=15768000;preload' , 
15231523					'X-Permitted-Cross-Domain-Policies' : 'none' , 
@@ -1548,7 +1548,7 @@ describe('OC.SetupChecks tests', function() {
15481548				{ 
15491549					'X-XSS-Protection' : '1; mode=block' , 
15501550					'X-Content-Type-Options' : 'nosniff' , 
1551- 					'X-Robots-Tag' : 'none ' , 
1551+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
15521552					'X-Frame-Options' : 'SAMEORIGIN' , 
15531553					'Strict-Transport-Security' : 'max-age=15768000' , 
15541554					'X-Permitted-Cross-Domain-Policies' : 'none' , 
@@ -1562,6 +1562,49 @@ describe('OC.SetupChecks tests', function() {
15621562			} ) ; 
15631563		} ) ; 
15641564
1565+ 		describe ( 'check X-Robots-Tag header' ,  function ( )  { 
1566+ 			it ( 'should return no message if X-Robots-Tag is set to noindex,nofollow without space' ,  function ( done )  { 
1567+ 				protocolStub . returns ( 'https' ) ; 
1568+ 				var  result  =  OC . SetupChecks . checkGeneric ( ) ; 
1569+ 				suite . server . requests [ 0 ] . respond ( 200 ,  { 
1570+ 					'Strict-Transport-Security' : 'max-age=15768000' , 
1571+ 					'X-XSS-Protection' : '1; mode=block' , 
1572+ 					'X-Content-Type-Options' : 'nosniff' , 
1573+ 					'X-Robots-Tag' : 'noindex,nofollow' , 
1574+ 					'X-Frame-Options' : 'SAMEORIGIN' , 
1575+ 					'X-Permitted-Cross-Domain-Policies' : 'none' , 
1576+ 					'Referrer-Policy' : 'no-referrer' , 
1577+ 				} ) ; 
1578+ 				result . done ( function (  data ,  s ,  x  ) { 
1579+ 					expect ( data ) . toEqual ( [ ] ) ; 
1580+ 					done ( ) ; 
1581+ 				} ) ; 
1582+ 			} ) ; 
1583+ 
1584+ 			it ( 'should return a message if X-Robots-Tag is set to none' ,  function ( done )  { 
1585+ 				protocolStub . returns ( 'https' ) ; 
1586+ 				var  result  =  OC . SetupChecks . checkGeneric ( ) ; 
1587+ 				suite . server . requests [ 0 ] . respond ( 200 ,  { 
1588+ 					'Strict-Transport-Security' : 'max-age=15768000' , 
1589+ 					'X-XSS-Protection' : '1; mode=block' , 
1590+ 					'X-Content-Type-Options' : 'nosniff' , 
1591+ 					'X-Robots-Tag' : 'none' , 
1592+ 					'X-Frame-Options' : 'SAMEORIGIN' , 
1593+ 					'X-Permitted-Cross-Domain-Policies' : 'none' , 
1594+ 					'Referrer-Policy' : 'no-referrer' , 
1595+ 				} ) ; 
1596+ 				result . done ( function (  data ,  s ,  x  ) { 
1597+ 					expect ( data ) . toEqual ( [ 
1598+ 						{ 
1599+ 							msg : 'The "X-Robots-Tag" HTTP header is not set to "noindex, nofollow". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.' , 
1600+ 							type : OC . SetupChecks . MESSAGE_TYPE_WARNING 
1601+ 						} 
1602+ 					] ) ; 
1603+ 					done ( ) ; 
1604+ 				} ) ; 
1605+ 			} ) ; 
1606+ 		} ) ; 
1607+ 
15651608		describe ( 'check X-XSS-Protection header' ,  function ( )  { 
15661609			it ( 'should return no message if X-XSS-Protection is set to 1; mode=block; report=https://example.com' ,  function ( done )  { 
15671610				protocolStub . returns ( 'https' ) ; 
@@ -1571,7 +1614,7 @@ describe('OC.SetupChecks tests', function() {
15711614					'Strict-Transport-Security' : 'max-age=15768000' , 
15721615					'X-XSS-Protection' : '1; mode=block; report=https://example.com' , 
15731616					'X-Content-Type-Options' : 'nosniff' , 
1574- 					'X-Robots-Tag' : 'none ' , 
1617+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
15751618					'X-Frame-Options' : 'SAMEORIGIN' , 
15761619					'X-Permitted-Cross-Domain-Policies' : 'none' , 
15771620					'Referrer-Policy' : 'no-referrer' , 
@@ -1591,7 +1634,7 @@ describe('OC.SetupChecks tests', function() {
15911634					'Strict-Transport-Security' : 'max-age=15768000' , 
15921635					'X-XSS-Protection' : '1; mode=block' , 
15931636					'X-Content-Type-Options' : 'nosniff' , 
1594- 					'X-Robots-Tag' : 'none ' , 
1637+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
15951638					'X-Frame-Options' : 'SAMEORIGIN' , 
15961639					'X-Permitted-Cross-Domain-Policies' : 'none' , 
15971640					'Referrer-Policy' : 'no-referrer' , 
@@ -1611,7 +1654,7 @@ describe('OC.SetupChecks tests', function() {
16111654					'Strict-Transport-Security' : 'max-age=15768000' , 
16121655					'X-XSS-Protection' : '1' , 
16131656					'X-Content-Type-Options' : 'nosniff' , 
1614- 					'X-Robots-Tag' : 'none ' , 
1657+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
16151658					'X-Frame-Options' : 'SAMEORIGIN' , 
16161659					'X-Permitted-Cross-Domain-Policies' : 'none' , 
16171660					'Referrer-Policy' : 'no-referrer' , 
@@ -1636,7 +1679,7 @@ describe('OC.SetupChecks tests', function() {
16361679					'Strict-Transport-Security' : 'max-age=15768000' , 
16371680					'X-XSS-Protection' : '0' , 
16381681					'X-Content-Type-Options' : 'nosniff' , 
1639- 					'X-Robots-Tag' : 'none ' , 
1682+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
16401683					'X-Frame-Options' : 'SAMEORIGIN' , 
16411684					'X-Permitted-Cross-Domain-Policies' : 'none' , 
16421685					'Referrer-Policy' : 'no-referrer' , 
@@ -1663,7 +1706,7 @@ describe('OC.SetupChecks tests', function() {
16631706					'Strict-Transport-Security' : 'max-age=15768000' , 
16641707					'X-XSS-Protection' : '1; mode=block' , 
16651708					'X-Content-Type-Options' : 'nosniff' , 
1666- 					'X-Robots-Tag' : 'none ' , 
1709+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
16671710					'X-Frame-Options' : 'SAMEORIGIN' , 
16681711					'X-Permitted-Cross-Domain-Policies' : 'none' , 
16691712					'Referrer-Policy' : 'no-referrer' , 
@@ -1683,7 +1726,7 @@ describe('OC.SetupChecks tests', function() {
16831726					'Strict-Transport-Security' : 'max-age=15768000' , 
16841727					'X-XSS-Protection' : '1; mode=block' , 
16851728					'X-Content-Type-Options' : 'nosniff' , 
1686- 					'X-Robots-Tag' : 'none ' , 
1729+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
16871730					'X-Frame-Options' : 'SAMEORIGIN' , 
16881731					'X-Permitted-Cross-Domain-Policies' : 'none' , 
16891732					'Referrer-Policy' : 'no-referrer-when-downgrade' , 
@@ -1703,7 +1746,7 @@ describe('OC.SetupChecks tests', function() {
17031746					'Strict-Transport-Security' : 'max-age=15768000' , 
17041747					'X-XSS-Protection' : '1; mode=block' , 
17051748					'X-Content-Type-Options' : 'nosniff' , 
1706- 					'X-Robots-Tag' : 'none ' , 
1749+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
17071750					'X-Frame-Options' : 'SAMEORIGIN' , 
17081751					'X-Permitted-Cross-Domain-Policies' : 'none' , 
17091752					'Referrer-Policy' : 'strict-origin' , 
@@ -1723,7 +1766,7 @@ describe('OC.SetupChecks tests', function() {
17231766					'Strict-Transport-Security' : 'max-age=15768000' , 
17241767					'X-XSS-Protection' : '1; mode=block' , 
17251768					'X-Content-Type-Options' : 'nosniff' , 
1726- 					'X-Robots-Tag' : 'none ' , 
1769+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
17271770					'X-Frame-Options' : 'SAMEORIGIN' , 
17281771					'X-Permitted-Cross-Domain-Policies' : 'none' , 
17291772					'Referrer-Policy' : 'strict-origin-when-cross-origin' , 
@@ -1743,7 +1786,7 @@ describe('OC.SetupChecks tests', function() {
17431786					'Strict-Transport-Security' : 'max-age=15768000' , 
17441787					'X-XSS-Protection' : '1; mode=block' , 
17451788					'X-Content-Type-Options' : 'nosniff' , 
1746- 					'X-Robots-Tag' : 'none ' , 
1789+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
17471790					'X-Frame-Options' : 'SAMEORIGIN' , 
17481791					'X-Permitted-Cross-Domain-Policies' : 'none' , 
17491792					'Referrer-Policy' : 'same-origin' , 
@@ -1763,7 +1806,7 @@ describe('OC.SetupChecks tests', function() {
17631806					'Strict-Transport-Security' : 'max-age=15768000' , 
17641807					'X-XSS-Protection' : '1; mode=block' , 
17651808					'X-Content-Type-Options' : 'nosniff' , 
1766- 					'X-Robots-Tag' : 'none ' , 
1809+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
17671810					'X-Frame-Options' : 'SAMEORIGIN' , 
17681811					'X-Permitted-Cross-Domain-Policies' : 'none' , 
17691812					'Referrer-Policy' : 'origin' , 
@@ -1788,7 +1831,7 @@ describe('OC.SetupChecks tests', function() {
17881831					'Strict-Transport-Security' : 'max-age=15768000' , 
17891832					'X-XSS-Protection' : '1; mode=block' , 
17901833					'X-Content-Type-Options' : 'nosniff' , 
1791- 					'X-Robots-Tag' : 'none ' , 
1834+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
17921835					'X-Frame-Options' : 'SAMEORIGIN' , 
17931836					'X-Permitted-Cross-Domain-Policies' : 'none' , 
17941837					'Referrer-Policy' : 'origin-when-cross-origin' , 
@@ -1813,7 +1856,7 @@ describe('OC.SetupChecks tests', function() {
18131856					'Strict-Transport-Security' : 'max-age=15768000' , 
18141857					'X-XSS-Protection' : '1; mode=block' , 
18151858					'X-Content-Type-Options' : 'nosniff' , 
1816- 					'X-Robots-Tag' : 'none ' , 
1859+ 					'X-Robots-Tag' : 'noindex, nofollow ' , 
18171860					'X-Frame-Options' : 'SAMEORIGIN' , 
18181861					'X-Permitted-Cross-Domain-Policies' : 'none' , 
18191862					'Referrer-Policy' : 'unsafe-url' , 
@@ -1840,7 +1883,7 @@ describe('OC.SetupChecks tests', function() {
18401883			{ 
18411884				'X-XSS-Protection' : '1; mode=block' , 
18421885				'X-Content-Type-Options' : 'nosniff' , 
1843- 				'X-Robots-Tag' : 'none ' , 
1886+ 				'X-Robots-Tag' : 'noindex, nofollow ' , 
18441887				'X-Frame-Options' : 'SAMEORIGIN' , 
18451888				'X-Permitted-Cross-Domain-Policies' : 'none' , 
18461889				'Referrer-Policy' : 'no-referrer' , 
@@ -1886,7 +1929,7 @@ describe('OC.SetupChecks tests', function() {
18861929			{ 
18871930				'X-XSS-Protection' : '1; mode=block' , 
18881931				'X-Content-Type-Options' : 'nosniff' , 
1889- 				'X-Robots-Tag' : 'none ' , 
1932+ 				'X-Robots-Tag' : 'noindex, nofollow ' , 
18901933				'X-Frame-Options' : 'SAMEORIGIN' , 
18911934				'X-Permitted-Cross-Domain-Policies' : 'none' , 
18921935				'Referrer-Policy' : 'no-referrer' , 
@@ -1911,7 +1954,7 @@ describe('OC.SetupChecks tests', function() {
19111954				'Strict-Transport-Security' : 'max-age=15551999' , 
19121955				'X-XSS-Protection' : '1; mode=block' , 
19131956				'X-Content-Type-Options' : 'nosniff' , 
1914- 				'X-Robots-Tag' : 'none ' , 
1957+ 				'X-Robots-Tag' : 'noindex, nofollow ' , 
19151958				'X-Frame-Options' : 'SAMEORIGIN' , 
19161959				'X-Permitted-Cross-Domain-Policies' : 'none' , 
19171960				'Referrer-Policy' : 'no-referrer' , 
@@ -1936,7 +1979,7 @@ describe('OC.SetupChecks tests', function() {
19361979				'Strict-Transport-Security' : 'iAmABogusHeader342' , 
19371980				'X-XSS-Protection' : '1; mode=block' , 
19381981				'X-Content-Type-Options' : 'nosniff' , 
1939- 				'X-Robots-Tag' : 'none ' , 
1982+ 				'X-Robots-Tag' : 'noindex, nofollow ' , 
19401983				'X-Frame-Options' : 'SAMEORIGIN' , 
19411984				'X-Permitted-Cross-Domain-Policies' : 'none' , 
19421985				'Referrer-Policy' : 'no-referrer' , 
@@ -1960,7 +2003,7 @@ describe('OC.SetupChecks tests', function() {
19602003			'Strict-Transport-Security' : 'max-age=15768000' , 
19612004			'X-XSS-Protection' : '1; mode=block' , 
19622005			'X-Content-Type-Options' : 'nosniff' , 
1963- 			'X-Robots-Tag' : 'none ' , 
2006+ 			'X-Robots-Tag' : 'noindex, nofollow ' , 
19642007			'X-Frame-Options' : 'SAMEORIGIN' , 
19652008			'X-Permitted-Cross-Domain-Policies' : 'none' , 
19662009			'Referrer-Policy' : 'no-referrer' , 
@@ -1980,7 +2023,7 @@ describe('OC.SetupChecks tests', function() {
19802023			'Strict-Transport-Security' : 'max-age=99999999' , 
19812024			'X-XSS-Protection' : '1; mode=block' , 
19822025			'X-Content-Type-Options' : 'nosniff' , 
1983- 			'X-Robots-Tag' : 'none ' , 
2026+ 			'X-Robots-Tag' : 'noindex, nofollow ' , 
19842027			'X-Frame-Options' : 'SAMEORIGIN' , 
19852028			'X-Permitted-Cross-Domain-Policies' : 'none' , 
19862029			'Referrer-Policy' : 'no-referrer' , 
@@ -2000,7 +2043,7 @@ describe('OC.SetupChecks tests', function() {
20002043			'Strict-Transport-Security' : 'max-age=99999999; includeSubDomains' , 
20012044			'X-XSS-Protection' : '1; mode=block' , 
20022045			'X-Content-Type-Options' : 'nosniff' , 
2003- 			'X-Robots-Tag' : 'none ' , 
2046+ 			'X-Robots-Tag' : 'noindex, nofollow ' , 
20042047			'X-Frame-Options' : 'SAMEORIGIN' , 
20052048			'X-Permitted-Cross-Domain-Policies' : 'none' , 
20062049			'Referrer-Policy' : 'no-referrer' , 
@@ -2020,7 +2063,7 @@ describe('OC.SetupChecks tests', function() {
20202063			'Strict-Transport-Security' : 'max-age=99999999; preload; includeSubDomains' , 
20212064			'X-XSS-Protection' : '1; mode=block' , 
20222065			'X-Content-Type-Options' : 'nosniff' , 
2023- 			'X-Robots-Tag' : 'none ' , 
2066+ 			'X-Robots-Tag' : 'noindex, nofollow ' , 
20242067			'X-Frame-Options' : 'SAMEORIGIN' , 
20252068			'X-Permitted-Cross-Domain-Policies' : 'none' , 
20262069			'Referrer-Policy' : 'no-referrer' , 
0 commit comments