Browse Source

Merge pull request #34122 from nextcloud/Valdnet-patch-3

l10n: Change to a capital letter
tags/v25.0.0beta7
Carl Schwan 1 year ago
parent
commit
a733a77f7b
No account linked to committer's email address

+ 1
- 1
core/js/setupchecks.js View File

@@ -655,7 +655,7 @@
var xssfields = xhr.getResponseHeader('X-XSS-Protection') ? xhr.getResponseHeader('X-XSS-Protection').split(';').map(function(item) { return item.trim(); }) : [];
if (xssfields.length === 0 || xssfields.indexOf('1') === -1 || xssfields.indexOf('mode=block') === -1) {
messages.push({
msg: t('core', 'The "{header}" HTTP header doesn\'t contain "{expected}". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
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.',
{
header: 'X-XSS-Protection',
expected: '1; mode=block'

+ 4
- 4
core/js/tests/specs/setupchecksSpec.js View File

@@ -1578,7 +1578,7 @@ describe('OC.SetupChecks tests', function() {
msg: 'The "X-Permitted-Cross-Domain-Policies" HTTP header is not set to "none". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}, {
msg: 'The "X-XSS-Protection" HTTP header doesn\'t contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
msg: 'The "X-XSS-Protection" HTTP header does not contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}, {
msg: 'The "Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin", "strict-origin-when-cross-origin" or "same-origin". This can leak referer information. See the <a target="_blank" rel="noreferrer noopener" class="external" href="https://www.w3.org/TR/referrer-policy/">W3C Recommendation ↗</a>.',
@@ -1610,7 +1610,7 @@ describe('OC.SetupChecks tests', function() {
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.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}, {
msg: 'The "X-XSS-Protection" HTTP header doesn\'t contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
msg: 'The "X-XSS-Protection" HTTP header does not contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING,
}
]);
@@ -1699,7 +1699,7 @@ describe('OC.SetupChecks tests', function() {
result.done(function( data, s, x ){
expect(data).toEqual([
{
msg: 'The "X-XSS-Protection" HTTP header doesn\'t contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
msg: 'The "X-XSS-Protection" HTTP header does not contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}
]);
@@ -1724,7 +1724,7 @@ describe('OC.SetupChecks tests', function() {
result.done(function( data, s, x ){
expect(data).toEqual([
{
msg: 'The "X-XSS-Protection" HTTP header doesn\'t contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
msg: 'The "X-XSS-Protection" HTTP header does not contain "1; mode=block". This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}
]);

+ 3
- 3
core/js/tests/specs/systemtags/systemtagsSpec.js View File

@@ -62,8 +62,8 @@ describe('OC.SystemTags tests', function() {
}

testScope(true, true, 'Fourty Two');
testScope(false, true, 'Fourty Two (invisible)');
testScope(false, false, 'Fourty Two (invisible)');
testScope(true, false, 'Fourty Two (restricted)');
testScope(false, true, 'Fourty Two (Invisible)');
testScope(false, false, 'Fourty Two (Invisible)');
testScope(true, false, 'Fourty Two (Restricted)');
});
});

+ 2
- 2
core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js View File

@@ -301,12 +301,12 @@ describe('OC.SystemTags.SystemTagsInputField tests', function() {
it('formatResult renders tag name with visibility', function() {
var opts = select2Stub.getCall(0).args[0];
var $el = $(opts.formatResult({id: '1', name: 'test', userVisible: false, userAssignable: false}));
expect($el.find('.label').text()).toEqual('test (invisible)');
expect($el.find('.label').text()).toEqual('test (Invisible)');
});
it('formatSelection renders tag name with visibility', function() {
var opts = select2Stub.getCall(0).args[0];
var $el = $(opts.formatSelection({id: '1', name: 'test', userVisible: false, userAssignable: false}));
expect($el.text().trim()).toEqual('test (invisible)');
expect($el.text().trim()).toEqual('test (Invisible)');
});
describe('initSelection', function() {
var fetchStub;

+ 2
- 2
core/src/systemtags/systemtags.js View File

@@ -56,11 +56,11 @@ import escapeHTML from 'escape-html'

var scope
if (!tag.userAssignable) {
scope = t('core', 'restricted')
scope = t('core', 'Restricted')
}
if (!tag.userVisible) {
// invisible also implicitly means not assignable
scope = t('core', 'invisible')
scope = t('core', 'Invisible')
}
if (scope) {
var $scope = document.createElement('em')

+ 2
- 2
dist/core-systemtags.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/core-systemtags.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save