summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.drone.yml22
m---------3rdparty0
-rw-r--r--README.md2
-rw-r--r--apps/comments/css/comments.css55
-rw-r--r--apps/comments/js/commentstabview.js56
-rw-r--r--apps/comments/lib/Notification/Notifier.php6
-rw-r--r--apps/comments/tests/Unit/Notification/NotifierTest.php4
-rw-r--r--apps/federation/l10n/ja.js2
-rw-r--r--apps/federation/l10n/ja.json2
-rw-r--r--apps/files/l10n/ru.js5
-rw-r--r--apps/files/l10n/ru.json5
-rw-r--r--apps/files_external/l10n/ka_GE.js18
-rw-r--r--apps/files_external/l10n/ka_GE.json18
-rw-r--r--apps/files_sharing/templates/public.php6
-rw-r--r--apps/updatenotification/lib/Notification/BackgroundJob.php9
-rw-r--r--apps/updatenotification/tests/Notification/BackgroundJobTest.php8
-rw-r--r--apps/user_ldap/l10n/hu.js8
-rw-r--r--apps/user_ldap/l10n/hu.json8
-rw-r--r--apps/user_ldap/l10n/ja.js1
-rw-r--r--apps/user_ldap/l10n/ja.json1
-rw-r--r--apps/user_ldap/templates/settings.php2
-rwxr-xr-xautotest.sh4
-rw-r--r--build/.phan/config.php10
-rw-r--r--build/integration/federation_features/federated.feature2
-rw-r--r--core/Command/App/Install.php8
-rw-r--r--core/Command/Maintenance/Install.php13
-rw-r--r--core/Command/Upgrade.php8
-rw-r--r--core/ajax/update.php3
-rw-r--r--core/css/header.scss2
-rw-r--r--core/css/inputs.scss29
-rw-r--r--core/css/share.scss4
-rw-r--r--core/js/setupchecks.js30
-rw-r--r--core/js/tests/specs/setupchecksSpec.js50
-rw-r--r--core/l10n/lt_LT.js10
-rw-r--r--core/l10n/lt_LT.json10
-rw-r--r--core/register_command.php2
-rw-r--r--lib/base.php28
-rw-r--r--lib/composer/composer/autoload_classmap.php1
-rw-r--r--lib/composer/composer/autoload_static.php1
-rw-r--r--lib/private/Authentication/Token/DefaultTokenProvider.php1
-rw-r--r--lib/private/DB/ConnectionFactory.php3
-rw-r--r--lib/private/DB/OCPostgreSqlPlatform.php95
-rw-r--r--lib/private/Files/Cache/Cache.php4
-rw-r--r--lib/private/Installer.php42
-rw-r--r--lib/private/Security/Bruteforce/Throttler.php27
-rw-r--r--lib/private/Server.php10
-rw-r--r--lib/private/Setup.php28
-rw-r--r--lib/private/Share20/DefaultShareProvider.php3
-rw-r--r--lib/private/Share20/Manager.php41
-rw-r--r--lib/private/Updater.php19
-rw-r--r--lib/private/legacy/app.php16
-rw-r--r--lib/private/legacy/image.php16
-rw-r--r--lib/private/legacy/util.php21
-rw-r--r--resources/codesigning/root.crl21
-rw-r--r--settings/Controller/AppSettingsController.php19
-rw-r--r--settings/ajax/updateapp.php8
-rw-r--r--settings/l10n/da.js10
-rw-r--r--settings/l10n/da.json10
-rw-r--r--tests/Settings/Controller/AppSettingsControllerTest.php10
-rw-r--r--tests/lib/Authentication/Token/DefaultTokenProviderTest.php1
-rw-r--r--tests/lib/DB/OCPostgreSqlPlatformTest.php35
-rw-r--r--tests/lib/ImageTest.php17
-rw-r--r--tests/lib/InstallerTest.php47
-rw-r--r--tests/lib/SetupTest.php6
-rw-r--r--tests/lib/UpdaterTest.php13
-rw-r--r--tests/lib/UtilTest.php18
66 files changed, 544 insertions, 450 deletions
diff --git a/.drone.yml b/.drone.yml
index 2f2867a5b2b..186969ccd06 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -299,6 +299,7 @@ pipeline:
matrix:
DB: postgres
PHP: 5.6
+ POSTGRES: 9
postgres-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -746,12 +747,19 @@ matrix:
ENABLE_REDIS: true
- DB: postgres
PHP: 5.6
+ POSTGRES: 9
ENABLE_REDIS: true
- DB: postgres
PHP: 7.0
+ POSTGRES: 9
ENABLE_REDIS: true
- DB: postgres
PHP: 7.1
+ POSTGRES: 9
+ ENABLE_REDIS: true
+ - DB: postgres
+ PHP: 7.1
+ POSTGRES: 10
ENABLE_REDIS: true
- DB: mysqlmb4
PHP: 5.6
@@ -833,7 +841,7 @@ services:
when:
matrix:
ENABLE_REDIS_CLUSTER: true
- postgres:
+ postgres-9:
image: postgres:9
environment:
- POSTGRES_USER=oc_autotest
@@ -843,6 +851,18 @@ services:
when:
matrix:
DB: postgres
+ POSTGRES: 9
+ postgres-10:
+ image: postgres:10
+ environment:
+ - POSTGRES_USER=oc_autotest
+ - POSTGRES_PASSWORD=owncloud
+ tmpfs:
+ - /var/lib/postgresql/data
+ when:
+ matrix:
+ DB: postgres
+ POSTGRES: 10
mysql:
image: mysql:5.7
environment:
diff --git a/3rdparty b/3rdparty
-Subproject ec71700daf6aab080502f67ecfca274dcb0bb3d
+Subproject f4e328bc4cc67011d206ca024483531a3b8c544
diff --git a/README.md b/README.md
index 9b7aa4298bc..bc962444913 100644
--- a/README.md
+++ b/README.md
@@ -60,7 +60,7 @@ More information how to contribute: [https://nextcloud.com/contribute/](https://
Third-party components are handled as git submodules which have to be initialized first. So aside from the regular git checkout invoking `git submodule update --init` or a similar command is needed, for details see Git documentation.
-Several apps by default included in regular releases like [firstrunwizard](https://github.com/nextcloud/firstrunwizard) or [gallery](https://github.com/nextcloud/gallery) are missing in `master` and have to be installed manually as required.
+Several apps that are included by default in regular releases such as [firstrunwizard](https://github.com/nextcloud/firstrunwizard) or [gallery](https://github.com/nextcloud/gallery) are missing in `master` and have to be installed manually.
That aside Git checkouts can be handled the same as release archives.
diff --git a/apps/comments/css/comments.css b/apps/comments/css/comments.css
index 1ed418df2fc..646f5f1100c 100644
--- a/apps/comments/css/comments.css
+++ b/apps/comments/css/comments.css
@@ -35,13 +35,27 @@
border: none;
opacity: .3;
}
-#commentsTabView .newCommentForm .submit:hover,
-#commentsTabView .newCommentForm .submit:focus {
+#commentsTabView .newCommentForm .submit:not(:disabled):hover,
+#commentsTabView .newCommentForm .submit:not(:disabled):focus {
opacity: 1;
}
#commentsTabView .newCommentForm .submitLoading {
background-position: left;
+
+ /* Match rules for '#commentsTabView .newCommentForm .submit' to place the
+ loading icon at the same position as the confirm icon */
+ position: absolute;
+ bottom: 0px;
+ right: 8px;
+ width: 30px;
+ margin: 0;
+ padding: 7px 9px;
+
+ /* Match rules for 'input[type="submit"]' to place the loading icon at the
+ same position as the confirm icon */
+ min-height: 34px;
+ box-sizing: border-box;
}
#commentsTabView .newCommentForm .cancel {
@@ -69,6 +83,7 @@
width: 32px;
height: 32px;
line-height: 32px;
+ margin-right: 5px;
}
#commentsTabView .comment .message .avatar,
@@ -112,7 +127,7 @@
background-repeat: no-repeat;
}
-#commentsTabView .authorRow>div {
+#commentsTabView .authorRow>div:not(.contactsmenu-popover) {
display: inline-block;
vertical-align: middle;
}
@@ -125,7 +140,25 @@
.atwho-view-ul * .avatar-name-wrapper,
#commentsTabView .comment .authorRow {
position: relative;
+}
+
+#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser),
+#commentsTabView .comment:not(.newCommentRow) .message .avatar-name-wrapper:not(.currentUser) .avatar,
+#commentsTabView .comment .authorRow .avatar:not(.currentUser),
+#commentsTabView .comment .authorRow .author:not(.currentUser) {
+ cursor: pointer;
+}
+
+.atwho-view-ul .avatar-name-wrapper,
+.atwho-view-ul .avatar-name-wrapper .avatar {
cursor: pointer;
+ display: inline-flex;
+ align-items: center;
+ width: 100%;
+}
+
+#commentsTabView .comments li .message .atwho-inserted {
+ margin-left: 5px;
}
.atwho-view-ul * .avatar-name-wrapper {
@@ -136,23 +169,20 @@
#commentsTabView .comment .date {
opacity: .5;
}
-#commentsTabView .comment .author {
- margin-left: 5px;
-}
#commentsTabView .comment .date {
- position: absolute;
- right: 0;
- top: 5px;
+ margin-left: auto;
}
#commentsTabView .comments li .message {
padding-left: 40px;
+ display: inline-flex;
+ flex-wrap: wrap;
+ align-items: center;
}
#commentsTabView .comment .action {
opacity: 0;
- vertical-align: middle;
- display: inline-block;
+ padding: 5px;
}
#commentsTabView .comment:hover .action {
@@ -163,7 +193,8 @@
opacity: 1;
}
-#commentsTabView .comment .action.delete {
+#commentsTabView .comment .action.delete,
+#commentsTabView .comment .deleteLoading {
position: absolute;
right: 0;
}
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 7398a709421..0c43e156985 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -23,10 +23,11 @@
var EDIT_COMMENT_TEMPLATE =
'<div class="newCommentRow comment" data-id="{{id}}">' +
' <div class="authorRow">' +
- ' <div class="avatar" data-username="{{actorId}}"></div>' +
- ' <div class="author">{{actorDisplayName}}</div>' +
+ ' <div class="avatar currentUser" data-username="{{actorId}}"></div>' +
+ ' <div class="author currentUser">{{actorDisplayName}}</div>' +
'{{#if isEditMode}}' +
' <a href="#" class="action delete icon icon-delete has-tooltip" title="{{deleteTooltip}}"></a>' +
+ ' <div class="deleteLoading icon-loading-small hidden"></div>'+
'{{/if}}' +
' </div>' +
' <form class="newCommentForm">' +
@@ -42,8 +43,8 @@
var COMMENT_TEMPLATE =
'<li class="comment{{#if isUnread}} unread{{/if}}{{#if isLong}} collapsed{{/if}}" data-id="{{id}}">' +
' <div class="authorRow">' +
- ' <div class="avatar" {{#if actorId}}data-username="{{actorId}}"{{/if}}> </div>' +
- ' <div class="author">{{actorDisplayName}}</div>' +
+ ' <div class="avatar{{#if isUserAuthor}} currentUser{{/if}}" {{#if actorId}}data-username="{{actorId}}"{{/if}}> </div>' +
+ ' <div class="author{{#if isUserAuthor}} currentUser{{/if}}">{{actorDisplayName}}</div>' +
'{{#if isUserAuthor}}' +
' <a href="#" class="action edit icon icon-rename has-tooltip" title="{{editTooltip}}"></a>' +
'{{/if}}' +
@@ -214,13 +215,15 @@
searchKey: "label"
});
$target.on('inserted.atwho', function (je, $el) {
+ var editionMode = true;
s._postRenderItem(
// we need to pass the parent of the inserted element
// passing the whole comments form would re-apply and request
// avatars from the server
$(je.target).find(
'div[data-username="' + $el.find('[data-username]').data('username') + '"]'
- ).parent()
+ ).parent(),
+ editionMode
);
});
},
@@ -320,7 +323,7 @@
this.$container.append($comment);
}
this._postRenderItem($comment);
- $('#commentsTabView').find('.newCommentForm div.message').text('').prop('disabled', false);
+ $('#commentsTabView').find('.newCommentForm div.message').text('').prop('contenteditable', true);
// we need to update the model, because it consists of client data
// only, but the server might add meta data, e.g. about mentions
@@ -377,7 +380,7 @@
});
},
- _postRenderItem: function($el) {
+ _postRenderItem: function($el, editionMode) {
$el.find('.has-tooltip').tooltip();
$el.find('.avatar').each(function() {
var $this = $(this);
@@ -395,16 +398,23 @@
// it is the case when writing a comment and mentioning a person
$message = $el;
}
- this._postRenderMessage($message);
+ this._postRenderMessage($message, editionMode);
},
- _postRenderMessage: function($el) {
+ _postRenderMessage: function($el, editionMode) {
+ if (editionMode) {
+ return;
+ }
+
$el.find('.avatar').each(function() {
var avatar = $(this);
var strong = $(this).next();
var appendTo = $(this).parent();
- $.merge(avatar, strong).contactsMenu(avatar.data('user'), 0, appendTo);
+ var username = $(this).data('username');
+ if (username !== oc_current_user) {
+ $.merge(avatar, strong).contactsMenu(avatar.data('user'), 0, appendTo);
+ }
});
},
@@ -445,9 +455,11 @@
+ ' data-user-display-name="'
+ _.escape(displayName) + '"></div>';
+ var isCurrentUser = (uid === OC.getCurrentUser().uid);
+
return ''
+ '<span class="atwho-inserted" contenteditable="false">'
- + '<span class="avatar-name-wrapper">'
+ + '<span class="avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '">'
+ avatar + ' <strong>'+ _.escape(displayName)+'</strong>'
+ '</span>'
+ '</span>';
@@ -486,7 +498,8 @@
.html(this._formatMessage(commentToEdit.get('message'), commentToEdit.get('mentions')))
.find('.avatar')
.each(function () { $(this).avatar(); });
- this._postRenderItem($message);
+ var editionMode = true;
+ this._postRenderItem($message, editionMode);
// Enable autosize
autosize($formRow.find('.message'));
@@ -543,10 +556,17 @@
ev.preventDefault();
var $comment = $(ev.target).closest('.comment');
var commentId = $comment.data('id');
- var $loading = $comment.find('.submitLoading');
-
+ var $loading = $comment.find('.deleteLoading');
+ var $commentField = $comment.find('.message');
+ var $submit = $comment.find('.submit');
+ var $cancel = $comment.find('.cancel');
+
+ $commentField.prop('contenteditable', false);
+ $submit.prop('disabled', true);
+ $cancel.prop('disabled', true);
$comment.addClass('disabled');
$loading.removeClass('hidden');
+
this.collection.get(commentId).destroy({
success: function() {
$comment.data('commentEl').remove();
@@ -555,6 +575,10 @@
error: function() {
$loading.addClass('hidden');
$comment.removeClass('disabled');
+ $commentField.prop('contenteditable', true);
+ $submit.prop('disabled', false);
+ $cancel.prop('disabled', false);
+
OC.Notification.showTemporary(t('comments', 'Error occurred while retrieving comment with id {id}', {id: commentId}));
}
});
@@ -620,7 +644,7 @@
return;
}
- $commentField.prop('disabled', true);
+ $commentField.prop('contenteditable', false);
$submit.addClass('hidden');
$loading.removeClass('hidden');
@@ -673,7 +697,7 @@
_onSubmitError: function($form, commentId) {
$form.find('.submit').removeClass('hidden');
$form.find('.submitLoading').addClass('hidden');
- $form.find('.message').prop('disabled', false);
+ $form.find('.message').prop('contenteditable', true);
if(!_.isUndefined(commentId)) {
OC.Notification.show(t('comments', 'Error occurred while updating comment with id {id}', {id: commentId}), {type: 'error'});
diff --git a/apps/comments/lib/Notification/Notifier.php b/apps/comments/lib/Notification/Notifier.php
index 55802c9a08d..ead68840a4f 100644
--- a/apps/comments/lib/Notification/Notifier.php
+++ b/apps/comments/lib/Notification/Notifier.php
@@ -99,17 +99,17 @@ class Notifier implements INotifier {
$userFolder = $this->rootFolder->getUserFolder($notification->getUser());
$nodes = $userFolder->getById((int)$parameters[1]);
if(empty($nodes)) {
- throw new \InvalidArgumentException('Cannot resolve file id to Node instance');
+ throw new \InvalidArgumentException('Cannot resolve file ID to node instance');
}
$node = $nodes[0];
if ($isDeletedActor) {
$notification->setParsedSubject($l->t(
- 'A (now) deleted user mentioned you in a comment on “%s”',
+ 'You were mentioned on “%s”, in a comment by a user that has since been deleted',
[$node->getName()]
))
->setRichSubject(
- $l->t('A (now) deleted user mentioned you in a comment on “{file}”'),
+ $l->t('You were mentioned on “{file}”, in a comment by a user that has since been deleted'),
[
'file' => [
'type' => 'file',
diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php
index a7ada41d43a..07dcbfdd849 100644
--- a/apps/comments/tests/Unit/Notification/NotifierTest.php
+++ b/apps/comments/tests/Unit/Notification/NotifierTest.php
@@ -188,7 +188,7 @@ class NotifierTest extends TestCase {
public function testPrepareSuccessDeletedUser() {
$fileName = 'Gre\'thor.odp';
- $message = 'A (now) deleted user mentioned you in a comment on “Gre\'thor.odp”';
+ $message = 'You were mentioned on “Gre\'thor.odp”, in a comment by a user that has since been deleted';
/** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
$node = $this->createMock(Node::class);
@@ -230,7 +230,7 @@ class NotifierTest extends TestCase {
$this->notification
->expects($this->once())
->method('setRichSubject')
- ->with('A (now) deleted user mentioned you in a comment on “{file}”', $this->anything())
+ ->with('You were mentioned on “{file}”, in a comment by a user that has since been deleted', $this->anything())
->willReturnSelf();
$this->notification
->expects($this->once())
diff --git a/apps/federation/l10n/ja.js b/apps/federation/l10n/ja.js
index 6f8a9ee096c..ebdf316e963 100644
--- a/apps/federation/l10n/ja.js
+++ b/apps/federation/l10n/ja.js
@@ -7,7 +7,7 @@ OC.L10N.register(
"Could not add server" : "サーバーを追加できませんでした",
"Trusted servers" : "信頼済サーバー",
"Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "連携では他の信頼済サーバーとユーザーリストをやり取りすること許可します。例えば、連携共有時で他のサーバーのユーザーのIDを自動補完します。",
- "Add server automatically once a federated share was created successfully" : "追加するサーバは自動的に統合され、共有が追加されました",
+ "Add server automatically once a federated share was created successfully" : "追加するサーバーは自動的に統合され、共有が追加されました",
"+ Add trusted server" : "+ 信頼済サーバーに追加",
"Trusted server" : "信頼済サーバー",
"Add" : "追加",
diff --git a/apps/federation/l10n/ja.json b/apps/federation/l10n/ja.json
index 53147709788..1477edd2ac3 100644
--- a/apps/federation/l10n/ja.json
+++ b/apps/federation/l10n/ja.json
@@ -5,7 +5,7 @@
"Could not add server" : "サーバーを追加できませんでした",
"Trusted servers" : "信頼済サーバー",
"Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "連携では他の信頼済サーバーとユーザーリストをやり取りすること許可します。例えば、連携共有時で他のサーバーのユーザーのIDを自動補完します。",
- "Add server automatically once a federated share was created successfully" : "追加するサーバは自動的に統合され、共有が追加されました",
+ "Add server automatically once a federated share was created successfully" : "追加するサーバーは自動的に統合され、共有が追加されました",
"+ Add trusted server" : "+ 信頼済サーバーに追加",
"Trusted server" : "信頼済サーバー",
"Add" : "追加",
diff --git a/apps/files/l10n/ru.js b/apps/files/l10n/ru.js
index 09a8a4d43f4..b6222725a72 100644
--- a/apps/files/l10n/ru.js
+++ b/apps/files/l10n/ru.js
@@ -19,6 +19,8 @@ OC.L10N.register(
"Uploading …" : "Загрузка...",
"…" : "...",
"{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} из {totalSize} ({bitrate})",
+ "Target folder does not exist any more" : "Каталог больше не существует",
+ "Error when assembling chunks, status code {status}" : "Ошибка при сборке чанков, код ошибки {status}",
"Actions" : "Действия",
"Download" : "Скачать",
"Rename" : "Переименовать",
@@ -125,6 +127,7 @@ OC.L10N.register(
"Settings" : "Настройки",
"Show hidden files" : "Показывать скрытые файлы",
"WebDAV" : "WebDAV",
+ "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">access your Files via WebDAV</a>" : "Используйте этот адрес для <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">доступа к вашим файлам через WebDAV</a>",
"Cancel upload" : "Отменить загрузку",
"No files in here" : "Здесь нет файлов",
"Upload some content or sync with your devices!" : "Загрузите что-нибудь или синхронизируйте со своими устройствами!",
@@ -155,7 +158,7 @@ OC.L10N.register(
"Move" : "Перенести",
"Copy local link" : "Скопировать локальную ссылку",
"Folder" : "Каталог",
- "Upload" : "Выгрузить",
+ "Upload" : "Загрузить",
"A new file or folder has been <strong>deleted</strong>" : "Новый файл или каталог был <strong>удален</strong>",
"A new file or folder has been <strong>restored</strong>" : "Новый файл или каталог был <strong>восстановлен</strong>",
"Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Используйте этот адрес <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">для доступа по WebDAV</a>",
diff --git a/apps/files/l10n/ru.json b/apps/files/l10n/ru.json
index 8796534297e..e989cdd3183 100644
--- a/apps/files/l10n/ru.json
+++ b/apps/files/l10n/ru.json
@@ -17,6 +17,8 @@
"Uploading …" : "Загрузка...",
"…" : "...",
"{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} из {totalSize} ({bitrate})",
+ "Target folder does not exist any more" : "Каталог больше не существует",
+ "Error when assembling chunks, status code {status}" : "Ошибка при сборке чанков, код ошибки {status}",
"Actions" : "Действия",
"Download" : "Скачать",
"Rename" : "Переименовать",
@@ -123,6 +125,7 @@
"Settings" : "Настройки",
"Show hidden files" : "Показывать скрытые файлы",
"WebDAV" : "WebDAV",
+ "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">access your Files via WebDAV</a>" : "Используйте этот адрес для <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">доступа к вашим файлам через WebDAV</a>",
"Cancel upload" : "Отменить загрузку",
"No files in here" : "Здесь нет файлов",
"Upload some content or sync with your devices!" : "Загрузите что-нибудь или синхронизируйте со своими устройствами!",
@@ -153,7 +156,7 @@
"Move" : "Перенести",
"Copy local link" : "Скопировать локальную ссылку",
"Folder" : "Каталог",
- "Upload" : "Выгрузить",
+ "Upload" : "Загрузить",
"A new file or folder has been <strong>deleted</strong>" : "Новый файл или каталог был <strong>удален</strong>",
"A new file or folder has been <strong>restored</strong>" : "Новый файл или каталог был <strong>восстановлен</strong>",
"Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Используйте этот адрес <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">для доступа по WebDAV</a>",
diff --git a/apps/files_external/l10n/ka_GE.js b/apps/files_external/l10n/ka_GE.js
index 3499af1585b..ff2f4e9afab 100644
--- a/apps/files_external/l10n/ka_GE.js
+++ b/apps/files_external/l10n/ka_GE.js
@@ -10,14 +10,14 @@ OC.L10N.register(
"Error configuring OAuth2" : "OAuth2-ის კონფიგურირებისას წარმოიშვა შეცდომა",
"Generate keys" : "გასაღებების გენერირება",
"Error generating key pair" : "გასაღების წყვილის გენერირებისას წარმოიშვა შეცდომა",
- "All users. Type to select user or group." : "ყველა მომხმარებელი. მოხმარებლის ან ჯგუფის ასარჩევად დაიწყეთ ბეჭდვა .",
+ "All users. Type to select user or group." : "ყველა მომხმარებელი. მოხმარებლის ან ჯგუფის ასარჩევად დაიწყეთ ბეჭდვა.",
"(group)" : "(ჯგუფი)",
"Compatibility with Mac NFD encoding (slow)" : "Mac NFD-სთან თავსებადობა (ნელი)",
- "Admin defined" : "ადმინისტრატორი მითითებულია",
+ "Admin defined" : "განსაზღვრულია ადმინისტრატორის მიერ",
"Are you sure you want to delete this external storage" : "დარწმუნებული ხართ, რომ გსურთ ამ გარე საცავის გაუქმება?",
"Delete storage?" : "გავაუქმოთ საცავი?",
"Saved" : "შენახულია",
- "Saving..." : "ინახება...",
+ "Saving..." : "ინახება…",
"Save" : "შენახვა",
"Empty response from the server" : "სერვერმა დააბრუნა ცარიელი პასუხი",
"Couldn't access. Please log out and in again to activate this mount point" : "წვდომა ვერ მოხერხდა. ამ მონტაჟის წერტილის გასააქტიურებლად გთხოვთ გახვიდეთ და ახლიდან გაიაროთ ავტორიზაცია.",
@@ -28,7 +28,7 @@ OC.L10N.register(
"external-storage" : "გარე-საცავი",
"Couldn't fetch list of Windows network drive mount points: Empty response from server" : "Windows-ის ქსელის დრაივის მონტაჯის წერტილების სიის მოპოვება ვერ მოხერხდა: ცარიელი პასუხი სერვერიდან",
"Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "ზოგი კონფიგურირებული გარე მონტაჟის წერიტილი არაა დაკავშირებული. მეტი ინფორმაციისთვის გთხოვთ დააწკაპუნოთ წითელ რიგ(ებ)ს.",
- "Please enter the credentials for the {mount} mount" : "გთხოვთ მონტაჟისთვის {mount} შეიყვანოთ მონაცემები",
+ "Please enter the credentials for the {mount} mount" : "გთხოვთ {mount} მონტაჟისთვის შეიყვანოთ მონაცემები",
"Username" : "მომხმარებლის სახელი",
"Password" : "პაროლი",
"Credentials saved" : "მონაცემები შენახულია",
@@ -41,7 +41,7 @@ OC.L10N.register(
"Invalid storage backend \"%s\"" : "არასწორი საცავის ბექენდი \"%s\"",
"Not permitted to use backend \"%s\"" : "ბექენის \"%s\" გამოყენება არაა ნებადართული",
"Not permitted to use authentication mechanism \"%s\"" : "აუტენტიკაციის მექანიზმის \"%s\"-ს გამოყენება არაა ნებადართული",
- "Unsatisfied backend parameters" : "ბექენიდს პარამეტრები არადამაკმაყოფილებელია",
+ "Unsatisfied backend parameters" : "ბექენდის პარამეტრები არადამაკმაყოფილებელია",
"Unsatisfied authentication mechanism parameters" : "აუტენტიფიკაციის მექნიზმის პარამეტრები არადამაკმაყოფილებელია",
"Insufficient data: %s" : "არასაკმარისი მონაცემები: %s",
"%s" : "%s",
@@ -59,7 +59,7 @@ OC.L10N.register(
"OpenStack" : "OpenStack",
"Tenant name" : "მოიჯარის სახელი",
"Identity endpoint URL" : "იდენტობის საბოლოო-წერტილის URL",
- "Rackspace" : "Rackspace",
+ "Rackspace" : "Rackspace-ი",
"API key" : "API გასაღები",
"Global credentials" : "გლობალური მონაცემები",
"Log-in credentials, save in database" : "ლოგინის მონაცემები, შენახვა მონაცემთა ბაზაში",
@@ -68,14 +68,14 @@ OC.L10N.register(
"User entered, store in database" : "შეყვანილი მომხმარებელი, შენახვა მონაცემთა ბაზაში",
"RSA public key" : "RSA ღია გასაღები",
"Public key" : "ღია გასაღები",
- "Amazon S3" : "Amazon S3",
+ "Amazon S3" : "Amazon S3-ი",
"Bucket" : "ხაპია",
"Hostname" : "ჰოსტი",
"Port" : "პორტი",
"Region" : "რეგიონი",
"Enable SSL" : "SSL-ის ამოქმედება",
"Enable Path Style" : "ბილიკის სტილის ამოქმედება",
- "WebDAV" : "WebDAV",
+ "WebDAV" : "WebDAV-ი",
"URL" : "URL",
"Remote subfolder" : "დისტანციური ქვე-დირექტორია",
"Secure https://" : "დაცული https://",
@@ -98,7 +98,7 @@ OC.L10N.register(
"Request timeout (seconds)" : "მოთხოვნის დროის ამოწურვა (წამები)",
"The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "cURL-ის მხარდაჭერა PHP-ში არაა მოქდენი ან დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.",
"The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP-ს მხარდაჭერა PHP-ში არაა მოქმედი ან დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.",
- "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"1 %s\" არაა დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.",
+ "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"%s\" არაა დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.",
"No external storage configured" : "გარე საცავი არაა კონფიგურირებული",
"You can add external storages in the personal settings" : "გარე საცავები შეგიძლიათ დაამატოთ პირად პარამეტრებში",
"Name" : "სახელი",
diff --git a/apps/files_external/l10n/ka_GE.json b/apps/files_external/l10n/ka_GE.json
index c64356f54b1..34f02298e85 100644
--- a/apps/files_external/l10n/ka_GE.json
+++ b/apps/files_external/l10n/ka_GE.json
@@ -8,14 +8,14 @@
"Error configuring OAuth2" : "OAuth2-ის კონფიგურირებისას წარმოიშვა შეცდომა",
"Generate keys" : "გასაღებების გენერირება",
"Error generating key pair" : "გასაღების წყვილის გენერირებისას წარმოიშვა შეცდომა",
- "All users. Type to select user or group." : "ყველა მომხმარებელი. მოხმარებლის ან ჯგუფის ასარჩევად დაიწყეთ ბეჭდვა .",
+ "All users. Type to select user or group." : "ყველა მომხმარებელი. მოხმარებლის ან ჯგუფის ასარჩევად დაიწყეთ ბეჭდვა.",
"(group)" : "(ჯგუფი)",
"Compatibility with Mac NFD encoding (slow)" : "Mac NFD-სთან თავსებადობა (ნელი)",
- "Admin defined" : "ადმინისტრატორი მითითებულია",
+ "Admin defined" : "განსაზღვრულია ადმინისტრატორის მიერ",
"Are you sure you want to delete this external storage" : "დარწმუნებული ხართ, რომ გსურთ ამ გარე საცავის გაუქმება?",
"Delete storage?" : "გავაუქმოთ საცავი?",
"Saved" : "შენახულია",
- "Saving..." : "ინახება...",
+ "Saving..." : "ინახება…",
"Save" : "შენახვა",
"Empty response from the server" : "სერვერმა დააბრუნა ცარიელი პასუხი",
"Couldn't access. Please log out and in again to activate this mount point" : "წვდომა ვერ მოხერხდა. ამ მონტაჟის წერტილის გასააქტიურებლად გთხოვთ გახვიდეთ და ახლიდან გაიაროთ ავტორიზაცია.",
@@ -26,7 +26,7 @@
"external-storage" : "გარე-საცავი",
"Couldn't fetch list of Windows network drive mount points: Empty response from server" : "Windows-ის ქსელის დრაივის მონტაჯის წერტილების სიის მოპოვება ვერ მოხერხდა: ცარიელი პასუხი სერვერიდან",
"Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "ზოგი კონფიგურირებული გარე მონტაჟის წერიტილი არაა დაკავშირებული. მეტი ინფორმაციისთვის გთხოვთ დააწკაპუნოთ წითელ რიგ(ებ)ს.",
- "Please enter the credentials for the {mount} mount" : "გთხოვთ მონტაჟისთვის {mount} შეიყვანოთ მონაცემები",
+ "Please enter the credentials for the {mount} mount" : "გთხოვთ {mount} მონტაჟისთვის შეიყვანოთ მონაცემები",
"Username" : "მომხმარებლის სახელი",
"Password" : "პაროლი",
"Credentials saved" : "მონაცემები შენახულია",
@@ -39,7 +39,7 @@
"Invalid storage backend \"%s\"" : "არასწორი საცავის ბექენდი \"%s\"",
"Not permitted to use backend \"%s\"" : "ბექენის \"%s\" გამოყენება არაა ნებადართული",
"Not permitted to use authentication mechanism \"%s\"" : "აუტენტიკაციის მექანიზმის \"%s\"-ს გამოყენება არაა ნებადართული",
- "Unsatisfied backend parameters" : "ბექენიდს პარამეტრები არადამაკმაყოფილებელია",
+ "Unsatisfied backend parameters" : "ბექენდის პარამეტრები არადამაკმაყოფილებელია",
"Unsatisfied authentication mechanism parameters" : "აუტენტიფიკაციის მექნიზმის პარამეტრები არადამაკმაყოფილებელია",
"Insufficient data: %s" : "არასაკმარისი მონაცემები: %s",
"%s" : "%s",
@@ -57,7 +57,7 @@
"OpenStack" : "OpenStack",
"Tenant name" : "მოიჯარის სახელი",
"Identity endpoint URL" : "იდენტობის საბოლოო-წერტილის URL",
- "Rackspace" : "Rackspace",
+ "Rackspace" : "Rackspace-ი",
"API key" : "API გასაღები",
"Global credentials" : "გლობალური მონაცემები",
"Log-in credentials, save in database" : "ლოგინის მონაცემები, შენახვა მონაცემთა ბაზაში",
@@ -66,14 +66,14 @@
"User entered, store in database" : "შეყვანილი მომხმარებელი, შენახვა მონაცემთა ბაზაში",
"RSA public key" : "RSA ღია გასაღები",
"Public key" : "ღია გასაღები",
- "Amazon S3" : "Amazon S3",
+ "Amazon S3" : "Amazon S3-ი",
"Bucket" : "ხაპია",
"Hostname" : "ჰოსტი",
"Port" : "პორტი",
"Region" : "რეგიონი",
"Enable SSL" : "SSL-ის ამოქმედება",
"Enable Path Style" : "ბილიკის სტილის ამოქმედება",
- "WebDAV" : "WebDAV",
+ "WebDAV" : "WebDAV-ი",
"URL" : "URL",
"Remote subfolder" : "დისტანციური ქვე-დირექტორია",
"Secure https://" : "დაცული https://",
@@ -96,7 +96,7 @@
"Request timeout (seconds)" : "მოთხოვნის დროის ამოწურვა (წამები)",
"The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "cURL-ის მხარდაჭერა PHP-ში არაა მოქდენი ან დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.",
"The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP-ს მხარდაჭერა PHP-ში არაა მოქმედი ან დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.",
- "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"1 %s\" არაა დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.",
+ "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"%s\" არაა დაყენებული. %s-ის მონტაჟი ვერ ხერხდება. გთხოვთ სთხოვოთ თქვენი სისტემის ადმინისტრატორს მისი დაყენება.",
"No external storage configured" : "გარე საცავი არაა კონფიგურირებული",
"You can add external storages in the personal settings" : "გარე საცავები შეგიძლიათ დაამატოთ პირად პარამეტრებში",
"Name" : "სახელი",
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 5417809b908..e17595d548b 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -97,6 +97,12 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
<source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
</video>
</div>
+ <?php elseif ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'audio'): ?>
+ <div id="imgframe">
+ <audio tabindex="0" controls="" preload="none" style="width: 100%; max-width: <?php p($_['previewMaxX']); ?>px; max-height: <?php p($_['previewMaxY']); ?>px">
+ <source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
+ </audio>
+ </div>
<?php else: ?>
<!-- Preview frame is filled via JS to support SVG images for modern browsers -->
<div id="imgframe"></div>
diff --git a/apps/updatenotification/lib/Notification/BackgroundJob.php b/apps/updatenotification/lib/Notification/BackgroundJob.php
index 08baa35664f..3c0cac60cde 100644
--- a/apps/updatenotification/lib/Notification/BackgroundJob.php
+++ b/apps/updatenotification/lib/Notification/BackgroundJob.php
@@ -53,6 +53,9 @@ class BackgroundJob extends TimedJob {
/** @var IClientService */
protected $client;
+ /** @var Installer */
+ protected $installer;
+
/** @var string[] */
protected $users;
@@ -64,8 +67,9 @@ class BackgroundJob extends TimedJob {
* @param IGroupManager $groupManager
* @param IAppManager $appManager
* @param IClientService $client
+ * @param Installer $installer
*/
- public function __construct(IConfig $config, IManager $notificationManager, IGroupManager $groupManager, IAppManager $appManager, IClientService $client) {
+ public function __construct(IConfig $config, IManager $notificationManager, IGroupManager $groupManager, IAppManager $appManager, IClientService $client, Installer $installer) {
// Run once a day
$this->setInterval(60 * 60 * 24);
@@ -74,6 +78,7 @@ class BackgroundJob extends TimedJob {
$this->groupManager = $groupManager;
$this->appManager = $appManager;
$this->client = $client;
+ $this->installer = $installer;
}
protected function run($argument) {
@@ -257,6 +262,6 @@ class BackgroundJob extends TimedJob {
* @return string|false
*/
protected function isUpdateAvailable($app) {
- return Installer::isUpdateAvailable($app, \OC::$server->getAppFetcher());
+ return $this->installer->isUpdateAvailable($app);
}
}
diff --git a/apps/updatenotification/tests/Notification/BackgroundJobTest.php b/apps/updatenotification/tests/Notification/BackgroundJobTest.php
index 92a8a687f5a..0355b10a09c 100644
--- a/apps/updatenotification/tests/Notification/BackgroundJobTest.php
+++ b/apps/updatenotification/tests/Notification/BackgroundJobTest.php
@@ -23,6 +23,7 @@
namespace OCA\UpdateNotification\Tests\Notification;
+use OC\Installer;
use OCA\UpdateNotification\Notification\BackgroundJob;
use OCP\App\IAppManager;
use OCP\Http\Client\IClientService;
@@ -47,6 +48,8 @@ class BackgroundJobTest extends TestCase {
protected $appManager;
/** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */
protected $client;
+ /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
+ protected $installer;
public function setUp() {
parent::setUp();
@@ -56,6 +59,7 @@ class BackgroundJobTest extends TestCase {
$this->groupManager = $this->createMock(IGroupManager::class);
$this->appManager = $this->createMock(IAppManager::class);
$this->client = $this->createMock(IClientService::class);
+ $this->installer = $this->createMock(Installer::class);
}
/**
@@ -69,7 +73,8 @@ class BackgroundJobTest extends TestCase {
$this->notificationManager,
$this->groupManager,
$this->appManager,
- $this->client
+ $this->client,
+ $this->installer
);
} {
return $this->getMockBuilder(BackgroundJob::class)
@@ -79,6 +84,7 @@ class BackgroundJobTest extends TestCase {
$this->groupManager,
$this->appManager,
$this->client,
+ $this->installer,
])
->setMethods($methods)
->getMock();
diff --git a/apps/user_ldap/l10n/hu.js b/apps/user_ldap/l10n/hu.js
index d76a5517461..82a8c910529 100644
--- a/apps/user_ldap/l10n/hu.js
+++ b/apps/user_ldap/l10n/hu.js
@@ -83,6 +83,7 @@ OC.L10N.register(
"LDAP / AD Email Address:" : "LDAP / AD e-mail cím:",
"Allows login against an email attribute. \"mail\" and \"mailPrimaryAddress\" allowed." : "Bejelentkezés engedélyezése az email attribútum alapján. \"mail\" és \"mailPrimaryAddress\" megengedett.",
"Other Attributes:" : "Más attribútumok:",
+ "Defines the filter to apply, when login is attempted. \"%%uid\" replaces the username in the login action. Example: \"uid=%%uid\"" : "A belépéskor alkalmazandó filtert definiálja. \"%%uid\" lecseréli a felhasználónevez a bejelentkezésnél. Példa: \"uid=%%uid\"",
"Test Loginname" : "Teszt bejelentkezési név",
"Verify settings" : "Beállítások ellenőrzése",
"1. Server" : "1. Szerver",
@@ -106,6 +107,7 @@ OC.L10N.register(
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Kerülje az automata LDAP kéréseket. Hasznos nagy telepítéseknél, de némi LDAP ismeretet igényel.",
"Manually enter LDAP filters (recommended for large directories)" : "LDAP szűrők kézi beállitása (ajánlott a nagy könyvtáraknál)",
"Listing and searching for users is constrained by these criteria:" : "Felhasználók keresésének és listázásának szabályozása ezekkel a szabályokkal:",
+ "The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "A leggyakoribb objektum osztályok a felhasználóknál az organizationalPerson, person, user, és inetOrgPerson. Ha nem vagy benne biztos melyik osztályt válaszd, kérlek konzultálj a könyvtár adminnal.",
"The filter specifies which LDAP users shall have access to the %s instance." : "A szűrő meghatározza, hogy mely LDAP felhasználók lesznek jogosultak %s elérésére.",
"Verify settings and count users" : "Beállítások ellenőrzése és felhasználók megszámolása",
"Saving" : "Mentés",
@@ -144,6 +146,7 @@ OC.L10N.register(
"User Display Name Field" : "A felhasználónév mezője",
"The LDAP attribute to use to generate the user's display name." : "Ebből az LDAP attribútumból képződik a felhasználó megjelenítendő neve.",
"2nd User Display Name Field" : "Második felhasználónév mező",
+ "Optional. An LDAP attribute to be added to the display name in brackets. Results in e.g. »John Doe (john.doe@example.org)«." : "Opcionális. Egy LDAP attribútum, melyet a felhasználónév mellé teszünk a zárójelben. Például: »John Doe (john.doe@example.org)«.",
"Base User Tree" : "A felhasználói fa gyökere",
"One User Base DN per line" : "Soronként egy felhasználói fa gyökerét adhatjuk meg",
"User Search Attributes" : "A felhasználók lekérdezett attribútumai",
@@ -155,13 +158,16 @@ OC.L10N.register(
"Group Search Attributes" : "A csoportok lekérdezett attribútumai",
"Group-Member association" : "A csoporttagság attribútuma",
"Dynamic Group Member URL" : "Dinamikus csoporttag URL",
+ "The LDAP attribute that on group objects contains an LDAP search URL that determines what objects belong to the group. (An empty setting disables dynamic group membership functionality.)" : "Az LDAP attribútum ami megmutatja az LDAP kereséseknél a csoport objektumban mi tartozik a csoportba. (Üres beállítás esetén a dinamikus csoporttagság funkció kikapcsol.)",
"Nested Groups" : "Egymásba ágyazott csoportok",
"When switched on, groups that contain groups are supported. (Only works if the group member attribute contains DNs.)" : "Amikor be van kapcsolva, akkor azokat a csoportokat is kezelni tudjuk, melyekben a személyek mellett csoportok is vannak. (Csak akkor működik, ha a csoportok \"member\" attribútuma DN-eket tartalmaz.)",
"Paging chunksize" : "Lapozási darab méret",
"Chunksize used for paged LDAP searches that may return bulky results like user or group enumeration. (Setting it 0 disables paged LDAP searches in those situations.)" : "A lapméret megadásával korlátozható az egy fordulóban kapott találatok száma, akkor is, ha az LDAP-keresés nagyon sok találatot ad, ha ezt az LDAP-kiszolgáló támogatja. (Ha 0-ra állítjuk, akkor ezáltal letiltjuk ezt a lapozó funkciót.)",
"Enable LDAP password changes per user" : "LDAP jelszavak felhasználónkénti változtatásának engedélyezése",
+ "Allow LDAP users to change their password and allow Super Administrators and Group Administrators to change the password of their LDAP users. Only works when access control policies are configured accordingly on the LDAP server. As passwords are sent in plaintext to the LDAP server, transport encryption must be used and password hashing should be configured on the LDAP server." : "LDAP felhasználók jelszómódosításának engedélyezése és Super Adminisztrátorok és Csoport Adminisztrátorok felhatalmazása felhasználóik jelszavainak módosítására. Csak az LDAP megfelelő jelszópolitikai beállításai mellett működik. Mivel a jelszavakat sima szövegként küldjük az LDAP szervernek, átviteli titkosítást kell alkalmazni és a jelszó hash-eket az LDAP szerveren kell bekapcsolni.",
"(New password is sent as plain text to LDAP)" : "(Az új jelszó sima szövegként lett elküldve az LDAP-nak)",
"Default password policy DN" : "Alapértelmezett jelszó szabály DN",
+ "The DN of a default password policy that will be used for password expiry handling. Works only when LDAP password changes per user are enabled and is only supported by OpenLDAP. Leave empty to disable password expiry handling." : "Az alapértelmezett jelszó lejárati politika DN-je, melyet alkalmazunk. Csak akkor működik, ha a felhasználónkénti jelszómódosítás be van kapcsolva és csak OpenLDAP-al. Hagyd üresen a jelszólejárat kikapcsolásához.",
"Special Attributes" : "Különleges attribútumok",
"Quota Field" : "Kvóta mező",
"Leave empty for user's default quota. Otherwise, specify an LDAP/AD attribute." : "Hagyd üresen az alapértelmezett felhasználói kvótáért, vagy adj meg egy LDAP/AD paramétert.",
@@ -172,12 +178,14 @@ OC.L10N.register(
"User Home Folder Naming Rule" : "Felhasználói Home mappa elnevezési szabály",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Hagyja üresen, ha a felhasználónevet kívánja használni. Ellenkező esetben adjon meg egy LDAP/AD attribútumot!",
"Internal Username" : "Belső felhasználónév",
+ "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." : "Alapértelmezetten egy belső felhasználónév jön létre a UUID attribútumból. Gondoskodik róla, hogy a felhasználónév egyedi legyen és ne kelljen a karaktereket konvertálni. A belső felhasználónév csak a következő karakterekből állhat: [ a-zA-Z0-9_.@- ]. Más karakterek az ASCII megfelelőikre lesznek cserélve, vagy csak simán ki lesznek hagyva. Ütközés eseté egy szám lesz hozzáadva, vagy növelve. A belső felhasználónév a felhasználó belső azonosítására szolgál. Egyben a felhasználó saját mappájának neveként is szolgál. Része a távoli URL-eknek, például az összes DAV szolgáltatásnál. Ezzel a beállítással az alapértelmezett működés felülírható. Hagyd üresen az alapértelmezett működéshez. A változások csak újonnan leképezett (hozzáadott) LDAP felhasználóknál kerül alkalmazásra.",
"Internal Username Attribute:" : "A belső felhasználónév attribútuma:",
"Override UUID detection" : "Az UUID-felismerés felülbírálása",
"By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." : "Az UUID attribútum alapértelmezetten felismerésre kerül. Az UUID attribútum segítségével az LDAP felhasználók és csoportok egyértelműen azonosíthatók. A belső felhasználónév is azonos lesz az UUID-vel, ha fentebb nincs másként definiálva. Ezt a beállítást felülbírálhatja és bármely attribútummal helyettesítheti. Ekkor azonban gondoskodnia kell arról, hogy a kiválasztott attribútum minden felhasználó és csoport esetén lekérdezhető legyen és egyedi értékkel bír. Ha a mezőt üresen hagyja, akkor az alapértelmezett attribútum lesz érvényes. Egy esetleges módosítás csak az újonnan hozzárendelt (ill. létrehozott) felhasználókra és csoportokra lesz érvényes.",
"UUID Attribute for Users:" : "A felhasználók UUID attribútuma:",
"UUID Attribute for Groups:" : "A csoportok UUID attribútuma:",
"Username-LDAP User Mapping" : "Felhasználó - LDAP felhasználó hozzárendelés",
+ "Usernames are used to store and assign (meta) data. In order to precisely identify and recognize users, each LDAP user will have an internal username. This requires a mapping from username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found. The internal username is used all over. Clearing the mappings will have leftovers everywhere. Clearing the mappings is not configuration sensitive, it affects all LDAP configurations! Never clear the mappings in a production environment, only in a testing or experimental stage." : "A felhasználónevek adattárolásra és hozzárendelésre (meta) szolgálnak. A felhasználók pontos felismerésére és azonosítására, minden LDAP felhasználóhoz hozzárendelünk egy belső felhaszhálónevet. Ez a felhasználónév LDAP felhasználóhoz rendelését igényli. A létrehozott felhasználónév az LDAP UUID-hez kötődik. Egyben a DN tárolásra kerül az LDAP interakció csökkentésére, de nem használjuk az azonosítás során. Ha a DN változik, a változást megtaláljuk. A belső felhasználónevek újrahasznosításra kerülnek. A leképezés kitörlése mindenfelé maradványokat eredményez. A leképezések törlése nem konfiguráció érzékeny, minden LDAP konfigurációt érint! Soha ne töröld a leképezéseket éles rendszeren, csak tesztelési vagy kísérleti állapotban.",
"Clear Username-LDAP User Mapping" : "A felhasználó - LDAP felhasználó hozzárendelés törlése",
"Clear Groupname-LDAP Group Mapping" : "A csoport - LDAP csoport hozzárendelés törlése",
"The %uid placeholder is missing. It will be replaced with the login name when querying LDAP / AD." : "A %uid helytartó hiányzik. Ez kerül behelyettesítésre a felhasználónévvel az LDAP / AD lekérdezéskor.",
diff --git a/apps/user_ldap/l10n/hu.json b/apps/user_ldap/l10n/hu.json
index e5efb5f2ae4..25f5622fc93 100644
--- a/apps/user_ldap/l10n/hu.json
+++ b/apps/user_ldap/l10n/hu.json
@@ -81,6 +81,7 @@
"LDAP / AD Email Address:" : "LDAP / AD e-mail cím:",
"Allows login against an email attribute. \"mail\" and \"mailPrimaryAddress\" allowed." : "Bejelentkezés engedélyezése az email attribútum alapján. \"mail\" és \"mailPrimaryAddress\" megengedett.",
"Other Attributes:" : "Más attribútumok:",
+ "Defines the filter to apply, when login is attempted. \"%%uid\" replaces the username in the login action. Example: \"uid=%%uid\"" : "A belépéskor alkalmazandó filtert definiálja. \"%%uid\" lecseréli a felhasználónevez a bejelentkezésnél. Példa: \"uid=%%uid\"",
"Test Loginname" : "Teszt bejelentkezési név",
"Verify settings" : "Beállítások ellenőrzése",
"1. Server" : "1. Szerver",
@@ -104,6 +105,7 @@
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Kerülje az automata LDAP kéréseket. Hasznos nagy telepítéseknél, de némi LDAP ismeretet igényel.",
"Manually enter LDAP filters (recommended for large directories)" : "LDAP szűrők kézi beállitása (ajánlott a nagy könyvtáraknál)",
"Listing and searching for users is constrained by these criteria:" : "Felhasználók keresésének és listázásának szabályozása ezekkel a szabályokkal:",
+ "The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "A leggyakoribb objektum osztályok a felhasználóknál az organizationalPerson, person, user, és inetOrgPerson. Ha nem vagy benne biztos melyik osztályt válaszd, kérlek konzultálj a könyvtár adminnal.",
"The filter specifies which LDAP users shall have access to the %s instance." : "A szűrő meghatározza, hogy mely LDAP felhasználók lesznek jogosultak %s elérésére.",
"Verify settings and count users" : "Beállítások ellenőrzése és felhasználók megszámolása",
"Saving" : "Mentés",
@@ -142,6 +144,7 @@
"User Display Name Field" : "A felhasználónév mezője",
"The LDAP attribute to use to generate the user's display name." : "Ebből az LDAP attribútumból képződik a felhasználó megjelenítendő neve.",
"2nd User Display Name Field" : "Második felhasználónév mező",
+ "Optional. An LDAP attribute to be added to the display name in brackets. Results in e.g. »John Doe (john.doe@example.org)«." : "Opcionális. Egy LDAP attribútum, melyet a felhasználónév mellé teszünk a zárójelben. Például: »John Doe (john.doe@example.org)«.",
"Base User Tree" : "A felhasználói fa gyökere",
"One User Base DN per line" : "Soronként egy felhasználói fa gyökerét adhatjuk meg",
"User Search Attributes" : "A felhasználók lekérdezett attribútumai",
@@ -153,13 +156,16 @@
"Group Search Attributes" : "A csoportok lekérdezett attribútumai",
"Group-Member association" : "A csoporttagság attribútuma",
"Dynamic Group Member URL" : "Dinamikus csoporttag URL",
+ "The LDAP attribute that on group objects contains an LDAP search URL that determines what objects belong to the group. (An empty setting disables dynamic group membership functionality.)" : "Az LDAP attribútum ami megmutatja az LDAP kereséseknél a csoport objektumban mi tartozik a csoportba. (Üres beállítás esetén a dinamikus csoporttagság funkció kikapcsol.)",
"Nested Groups" : "Egymásba ágyazott csoportok",
"When switched on, groups that contain groups are supported. (Only works if the group member attribute contains DNs.)" : "Amikor be van kapcsolva, akkor azokat a csoportokat is kezelni tudjuk, melyekben a személyek mellett csoportok is vannak. (Csak akkor működik, ha a csoportok \"member\" attribútuma DN-eket tartalmaz.)",
"Paging chunksize" : "Lapozási darab méret",
"Chunksize used for paged LDAP searches that may return bulky results like user or group enumeration. (Setting it 0 disables paged LDAP searches in those situations.)" : "A lapméret megadásával korlátozható az egy fordulóban kapott találatok száma, akkor is, ha az LDAP-keresés nagyon sok találatot ad, ha ezt az LDAP-kiszolgáló támogatja. (Ha 0-ra állítjuk, akkor ezáltal letiltjuk ezt a lapozó funkciót.)",
"Enable LDAP password changes per user" : "LDAP jelszavak felhasználónkénti változtatásának engedélyezése",
+ "Allow LDAP users to change their password and allow Super Administrators and Group Administrators to change the password of their LDAP users. Only works when access control policies are configured accordingly on the LDAP server. As passwords are sent in plaintext to the LDAP server, transport encryption must be used and password hashing should be configured on the LDAP server." : "LDAP felhasználók jelszómódosításának engedélyezése és Super Adminisztrátorok és Csoport Adminisztrátorok felhatalmazása felhasználóik jelszavainak módosítására. Csak az LDAP megfelelő jelszópolitikai beállításai mellett működik. Mivel a jelszavakat sima szövegként küldjük az LDAP szervernek, átviteli titkosítást kell alkalmazni és a jelszó hash-eket az LDAP szerveren kell bekapcsolni.",
"(New password is sent as plain text to LDAP)" : "(Az új jelszó sima szövegként lett elküldve az LDAP-nak)",
"Default password policy DN" : "Alapértelmezett jelszó szabály DN",
+ "The DN of a default password policy that will be used for password expiry handling. Works only when LDAP password changes per user are enabled and is only supported by OpenLDAP. Leave empty to disable password expiry handling." : "Az alapértelmezett jelszó lejárati politika DN-je, melyet alkalmazunk. Csak akkor működik, ha a felhasználónkénti jelszómódosítás be van kapcsolva és csak OpenLDAP-al. Hagyd üresen a jelszólejárat kikapcsolásához.",
"Special Attributes" : "Különleges attribútumok",
"Quota Field" : "Kvóta mező",
"Leave empty for user's default quota. Otherwise, specify an LDAP/AD attribute." : "Hagyd üresen az alapértelmezett felhasználói kvótáért, vagy adj meg egy LDAP/AD paramétert.",
@@ -170,12 +176,14 @@
"User Home Folder Naming Rule" : "Felhasználói Home mappa elnevezési szabály",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Hagyja üresen, ha a felhasználónevet kívánja használni. Ellenkező esetben adjon meg egy LDAP/AD attribútumot!",
"Internal Username" : "Belső felhasználónév",
+ "By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." : "Alapértelmezetten egy belső felhasználónév jön létre a UUID attribútumból. Gondoskodik róla, hogy a felhasználónév egyedi legyen és ne kelljen a karaktereket konvertálni. A belső felhasználónév csak a következő karakterekből állhat: [ a-zA-Z0-9_.@- ]. Más karakterek az ASCII megfelelőikre lesznek cserélve, vagy csak simán ki lesznek hagyva. Ütközés eseté egy szám lesz hozzáadva, vagy növelve. A belső felhasználónév a felhasználó belső azonosítására szolgál. Egyben a felhasználó saját mappájának neveként is szolgál. Része a távoli URL-eknek, például az összes DAV szolgáltatásnál. Ezzel a beállítással az alapértelmezett működés felülírható. Hagyd üresen az alapértelmezett működéshez. A változások csak újonnan leképezett (hozzáadott) LDAP felhasználóknál kerül alkalmazásra.",
"Internal Username Attribute:" : "A belső felhasználónév attribútuma:",
"Override UUID detection" : "Az UUID-felismerés felülbírálása",
"By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." : "Az UUID attribútum alapértelmezetten felismerésre kerül. Az UUID attribútum segítségével az LDAP felhasználók és csoportok egyértelműen azonosíthatók. A belső felhasználónév is azonos lesz az UUID-vel, ha fentebb nincs másként definiálva. Ezt a beállítást felülbírálhatja és bármely attribútummal helyettesítheti. Ekkor azonban gondoskodnia kell arról, hogy a kiválasztott attribútum minden felhasználó és csoport esetén lekérdezhető legyen és egyedi értékkel bír. Ha a mezőt üresen hagyja, akkor az alapértelmezett attribútum lesz érvényes. Egy esetleges módosítás csak az újonnan hozzárendelt (ill. létrehozott) felhasználókra és csoportokra lesz érvényes.",
"UUID Attribute for Users:" : "A felhasználók UUID attribútuma:",
"UUID Attribute for Groups:" : "A csoportok UUID attribútuma:",
"Username-LDAP User Mapping" : "Felhasználó - LDAP felhasználó hozzárendelés",
+ "Usernames are used to store and assign (meta) data. In order to precisely identify and recognize users, each LDAP user will have an internal username. This requires a mapping from username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found. The internal username is used all over. Clearing the mappings will have leftovers everywhere. Clearing the mappings is not configuration sensitive, it affects all LDAP configurations! Never clear the mappings in a production environment, only in a testing or experimental stage." : "A felhasználónevek adattárolásra és hozzárendelésre (meta) szolgálnak. A felhasználók pontos felismerésére és azonosítására, minden LDAP felhasználóhoz hozzárendelünk egy belső felhaszhálónevet. Ez a felhasználónév LDAP felhasználóhoz rendelését igényli. A létrehozott felhasználónév az LDAP UUID-hez kötődik. Egyben a DN tárolásra kerül az LDAP interakció csökkentésére, de nem használjuk az azonosítás során. Ha a DN változik, a változást megtaláljuk. A belső felhasználónevek újrahasznosításra kerülnek. A leképezés kitörlése mindenfelé maradványokat eredményez. A leképezések törlése nem konfiguráció érzékeny, minden LDAP konfigurációt érint! Soha ne töröld a leképezéseket éles rendszeren, csak tesztelési vagy kísérleti állapotban.",
"Clear Username-LDAP User Mapping" : "A felhasználó - LDAP felhasználó hozzárendelés törlése",
"Clear Groupname-LDAP Group Mapping" : "A csoport - LDAP csoport hozzárendelés törlése",
"The %uid placeholder is missing. It will be replaced with the login name when querying LDAP / AD." : "A %uid helytartó hiányzik. Ez kerül behelyettesítésre a felhasználónévvel az LDAP / AD lekérdezéskor.",
diff --git a/apps/user_ldap/l10n/ja.js b/apps/user_ldap/l10n/ja.js
index f05eecab563..07c0c12f5dc 100644
--- a/apps/user_ldap/l10n/ja.js
+++ b/apps/user_ldap/l10n/ja.js
@@ -99,6 +99,7 @@ OC.L10N.register(
"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "どのクライアントユーザーのDNで接続するか指定します。例えば uid=agent,dc=example,dc=com になります。匿名アクセスの場合、DNとパスワードは空のままにしてください。",
"Password" : "パスワード",
"For anonymous access, leave DN and Password empty." : "匿名アクセスの場合は、DNとパスワードを空のままにしてください。",
+ "Save Credentials" : "資格情報を保存",
"One Base DN per line" : "1行に1つのベースDNを記入",
"You can specify Base DN for users and groups in the Advanced tab" : "詳細設定でユーザーとグループのベースDNを指定することができます。",
"Detect Base DN" : "ベース DN を検出",
diff --git a/apps/user_ldap/l10n/ja.json b/apps/user_ldap/l10n/ja.json
index c07b58c0540..bcd872d9827 100644
--- a/apps/user_ldap/l10n/ja.json
+++ b/apps/user_ldap/l10n/ja.json
@@ -97,6 +97,7 @@
"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "どのクライアントユーザーのDNで接続するか指定します。例えば uid=agent,dc=example,dc=com になります。匿名アクセスの場合、DNとパスワードは空のままにしてください。",
"Password" : "パスワード",
"For anonymous access, leave DN and Password empty." : "匿名アクセスの場合は、DNとパスワードを空のままにしてください。",
+ "Save Credentials" : "資格情報を保存",
"One Base DN per line" : "1行に1つのベースDNを記入",
"You can specify Base DN for users and groups in the Advanced tab" : "詳細設定でユーザーとグループのベースDNを指定することができます。",
"Detect Base DN" : "ベース DN を検出",
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index 82e61cd5dcd..42bbaaf78ca 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -55,7 +55,7 @@ style('user_ldap', 'settings');
?>
<form id="ldap" class="section" action="#" method="post">
- <h2><?php p($l->t('LDAP')); ?></h2>
+ <h2><?php p($l->t('LDAP / AD integration')); ?></h2>
<div id="ldapSettings">
<ul>
diff --git a/autotest.sh b/autotest.sh
index e7300363c3a..da9661f067b 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -308,11 +308,11 @@ function execute_tests {
echo "Postgres is up."
else
if [ ! -z "$DRONE" ] ; then
- DATABASEHOST=postgres
+ DATABASEHOST="postgres-$POSTGRES"
fi
echo "Waiting for Postgres to be available ..."
if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 5432 60; then
- echo "[ERROR] Waited 60 seconds, no response" >&2
+ echo "[ERROR] Waited 60 seconds for $DATABASEHOST, no response" >&2
exit 1
fi
echo "Give it 10 additional seconds ..."
diff --git a/build/.phan/config.php b/build/.phan/config.php
index 47bcb87acdd..1bdaddc0e05 100644
--- a/build/.phan/config.php
+++ b/build/.phan/config.php
@@ -106,32 +106,32 @@ return [
// an analysis. You should consider setting this
// to true only when you wish you had more issues
// to fix in your code base.
- 'quick_mode' => true,
+ 'quick_mode' => false,
// If enabled, check all methods that override a
// parent method to make sure its signature is
// compatible with the parent's. This check
// can add quite a bit of time to the analysis.
- 'analyze_signature_compatibility' => false,
+ 'analyze_signature_compatibility' => true,
// The minimum severity level to report on. This can be
// set to Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL or
// Issue::SEVERITY_CRITICAL. Setting it to only
// critical issues is a good place to start on a big
// sloppy mature code base.
- 'minimum_severity' => 10,
+ 'minimum_severity' => \Phan\Issue::SEVERITY_CRITICAL,
// If true, missing properties will be created when
// they are first seen. If false, we'll report an
// error message if there is an attempt to write
// to a class property that wasn't explicitly
// defined.
- 'allow_missing_properties' => true,
+ 'allow_missing_properties' => false,
// Allow null to be cast as any type and for any
// type to be cast to null. Setting this to false
// will cut down on false positives.
- 'null_casts_as_any_type' => true,
+ 'null_casts_as_any_type' => false,
// Allow null to be cast as any array-like type (Requires 0.9.3+)
// This is an incremental step in migrating away from null_casts_as_any_type.
diff --git a/build/integration/federation_features/federated.feature b/build/integration/federation_features/federated.feature
index 8bf8e921b0f..c7b20cf86a7 100644
--- a/build/integration/federation_features/federated.feature
+++ b/build/integration/federation_features/federated.feature
@@ -113,7 +113,7 @@ Feature: federated
| permissions | 19 |
| stime | A_NUMBER |
| storage | A_NUMBER |
- | mail_send | 0 |
+ | mail_send | 1 |
| uid_owner | user1 |
| file_parent | A_NUMBER |
| displayname_owner | user1 |
diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php
index c8c4652d7ba..8f530975be9 100644
--- a/core/Command/App/Install.php
+++ b/core/Command/App/Install.php
@@ -51,13 +51,7 @@ class Install extends Command {
}
try {
- $installer = new Installer(
- \OC::$server->getAppFetcher(),
- \OC::$server->getHTTPClientService(),
- \OC::$server->getTempManager(),
- \OC::$server->getLogger(),
- \OC::$server->getConfig()
- );
+ $installer = \OC::$server->query(Installer::class);
$installer->downloadApp($appId);
$result = $installer->installApp($appId);
} catch(\Exception $e) {
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php
index 755d3d386c1..be6a2da22c8 100644
--- a/core/Command/Maintenance/Install.php
+++ b/core/Command/Maintenance/Install.php
@@ -30,6 +30,7 @@
namespace OC\Core\Command\Maintenance;
use InvalidArgumentException;
+use OC\Installer;
use OC\Setup;
use OC\SystemConfig;
use OCP\Defaults;
@@ -73,9 +74,15 @@ class Install extends Command {
// validate the environment
$server = \OC::$server;
- $setupHelper = new Setup($this->config, $server->getIniWrapper(),
- $server->getL10N('lib'), $server->query(Defaults::class), $server->getLogger(),
- $server->getSecureRandom());
+ $setupHelper = new Setup(
+ $this->config,
+ $server->getIniWrapper(),
+ $server->getL10N('lib'),
+ $server->query(Defaults::class),
+ $server->getLogger(),
+ $server->getSecureRandom(),
+ \OC::$server->query(Installer::class)
+ );
$sysInfo = $setupHelper->getSystemInfo(true);
$errors = $sysInfo['errors'];
if (count($errors) > 0) {
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 0877c19bc01..2a502dbe921 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -35,6 +35,7 @@
namespace OC\Core\Command;
use OC\Console\TimestampFormatter;
+use OC\Installer;
use OC\Updater;
use OCP\IConfig;
use OCP\ILogger;
@@ -63,11 +64,13 @@ class Upgrade extends Command {
/**
* @param IConfig $config
* @param ILogger $logger
+ * @param Installer $installer
*/
- public function __construct(IConfig $config, ILogger $logger) {
+ public function __construct(IConfig $config, ILogger $logger, Installer $installer) {
parent::__construct();
$this->config = $config;
$this->logger = $logger;
+ $this->installer = $installer;
}
protected function configure() {
@@ -101,7 +104,8 @@ class Upgrade extends Command {
$updater = new Updater(
$this->config,
\OC::$server->getIntegrityCodeChecker(),
- $this->logger
+ $this->logger,
+ $this->installer
);
if ($input->getOption('no-app-disable')) {
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 71d60f5c432..2a29d1e536c 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -116,7 +116,8 @@ if (OC::checkUpgrade(false)) {
$updater = new \OC\Updater(
$config,
\OC::$server->getIntegrityCodeChecker(),
- $logger
+ $logger,
+ \OC::$server->query(\OC\Installer::class)
);
$incompatibleApps = [];
$disabledThirdPartyApps = [];
diff --git a/core/css/header.scss b/core/css/header.scss
index 1844022e8a3..21305de0d02 100644
--- a/core/css/header.scss
+++ b/core/css/header.scss
@@ -461,6 +461,8 @@ nav {
}
.app-loading .icon-loading-small-dark {
top:12px;
+ width: 20px;
+ height: 20px;
}
diff --git a/core/css/inputs.scss b/core/css/inputs.scss
index 20e8cbf08e0..00e0e47f9a8 100644
--- a/core/css/inputs.scss
+++ b/core/css/inputs.scss
@@ -13,7 +13,7 @@
*/
/* Specifically override browser styles */
-input, textarea, select, button, div[contenteditable=true] {
+input, textarea, select, button, div[contenteditable=true], div[contenteditable=false] {
font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;
}
.select2-container-multi .select2-choices .select2-search-field input, .select2-search input, .ui-widget {
@@ -25,7 +25,8 @@ select,
button,
input,
textarea,
-div[contenteditable=true] {
+div[contenteditable=true],
+div[contenteditable=false] {
width: 130px;
min-height: 32px;
box-sizing: border-box;
@@ -88,6 +89,23 @@ div[contenteditable=true],
}
}
+div[contenteditable=false] {
+ margin: 3px 3px 3px 0;
+ padding: 7px 6px;
+ font-size: 13px;
+ background-color: $color-main-background;
+ color: nc-lighten($color-main-text, 33%);
+ border: 1px solid nc-darken($color-main-background, 14%);
+ outline: none;
+ border-radius: $border-radius;
+ cursor: text;
+
+ background-color: nc-darken($color-main-background, 8%);
+ color: rgba($color-main-text, 0.4);
+ cursor: default;
+ opacity: 0.5;
+}
+
/* Specific override */
input {
&:not([type='radio']):not([type='checkbox']):not([type='range']):not([type='submit']):not([type='button']):not([type='reset']):not([type='color']):not([type='file']):not([type='image']) {
@@ -171,6 +189,13 @@ textarea, div[contenteditable=true] {
}
}
+div[contenteditable=false] {
+ color: nc-lighten($color-main-text, 33%);
+ cursor: text;
+ font-family: inherit;
+ height: auto;
+}
+
/* Override the ugly select arrow */
select {
-webkit-appearance: none;
diff --git a/core/css/share.scss b/core/css/share.scss
index 37217fa926a..68b601bcb65 100644
--- a/core/css/share.scss
+++ b/core/css/share.scss
@@ -177,9 +177,11 @@
}
.contactsmenu-popover {
- left: -8px;
+ left: -6px;
right: auto;
padding: 3px 6px;
+ top: 100%;
+ margin-top: 0;
li.hidden {
display: none !important;
}
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index 88e44a547e4..c952c0a9a48 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -26,7 +26,7 @@
var messages = [];
if (xhr.status !== 207 && xhr.status !== 401) {
messages.push({
- msg: t('core', 'Your web server is not yet set up properly to allow file synchronization because the WebDAV interface seems to be broken.'),
+ msg: t('core', 'Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.'),
type: OC.SetupChecks.MESSAGE_TYPE_ERROR
});
}
@@ -66,7 +66,7 @@
if (xhr.status !== 207) {
var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-setup-well-known-URL');
messages.push({
- msg: t('core', 'Your web server is not set up properly to resolve "{url}". Further information can be found in our <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', { docLink: docUrl, url: url }),
+ msg: t('core', 'Your web server is not properly set up to resolve "{url}". Further information can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', { docLink: docUrl, url: url }),
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
@@ -94,19 +94,19 @@
if (xhr.status === 200 && data) {
if (!data.serverHasInternetConnection) {
messages.push({
- msg: t('core', 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable Internet connection for this server if you want to have all features.'),
+ msg: t('core', 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the Internet to enjoy all features.'),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
});
}
if(!data.isMemcacheConfigured) {
messages.push({
- msg: t('core', 'No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.memcacheDocs}),
+ msg: t('core', 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.memcacheDocs}),
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
if(!data.isUrandomAvailable) {
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 our <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.securityDocs}),
+ 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
});
}
@@ -118,13 +118,13 @@
}
if(data.phpSupported && data.phpSupported.eol) {
messages.push({
- msg: t('core', 'You are currently running PHP {version}. We encourage you to upgrade your PHP version to take advantage of <a target="_blank" rel="noreferrer noopener" href="{phpLink}">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.', {version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php'}),
+ msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of <a target="_blank" rel="noreferrer noopener" href="{phpLink}">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.', {version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php'}),
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
if(!data.forwardedForHeadersWorking) {
messages.push({
- msg: t('core', 'The reverse proxy headers configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If you are not accessing Nextcloud from a trusted proxy, this is a security issue and can allow an attacker to spoof their IP address as visible to Nextcloud. Further information can be found in our <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.reverseProxyDocs}),
+ msg: t('core', 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>.', {docLink: data.reverseProxyDocs}),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
});
}
@@ -138,7 +138,7 @@
messages.push({
msg: t(
'core',
- 'Some files have not passed the integrity check. Further information on how to resolve this issue can be found in our <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>. (<a href="{codeIntegrityDownloadEndpoint}">List of invalid files…</a> / <a href="{rescanEndpoint}">Rescan…</a>)',
+ 'Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the <a target="_blank" rel="noreferrer noopener" href="{docLink}">documentation</a>. (<a href="{codeIntegrityDownloadEndpoint}">List of invalid files…</a> / <a href="{rescanEndpoint}">Rescan…</a>)',
{
docLink: data.codeIntegrityCheckerDocumentation,
codeIntegrityDownloadEndpoint: OC.generateUrl('/settings/integrity/failed'),
@@ -152,7 +152,7 @@
messages.push({
msg: t(
'core',
- 'The PHP OPcache is not properly configured. <a target="_blank" rel="noreferrer noopener" href="{docLink}">For better performance we recommend</a> to use following settings in the <code>php.ini</code>:',
+ 'The PHP OPcache is not properly configured. <a target="_blank" rel="noreferrer noopener" href="{docLink}">For better performance it is recommended</a> to use the following settings in the <code>php.ini</code>:',
{
docLink: data.phpOpcacheDocumentation,
}
@@ -164,7 +164,7 @@
messages.push({
msg: t(
'core',
- 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. We strongly recommend enabling this function.'),
+ 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended.'),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
});
}
@@ -221,7 +221,7 @@
// .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 === '') {
messages.push({
- msg: t('core', 'Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working. It is strongly recommended that you configure your web server in a way that the data directory is no longer accessible or you move the data directory outside the web server document root.'),
+ 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.'),
type: OC.SetupChecks.MESSAGE_TYPE_ERROR
});
}
@@ -258,9 +258,9 @@
for (var header in securityHeaders) {
var option = securityHeaders[header][0];
if(!xhr.getResponseHeader(header) || xhr.getResponseHeader(header).toLowerCase() !== option.toLowerCase()) {
- var msg = t('core', 'The "{header}" HTTP header is not configured to equal to "{expected}". This is a potential security or privacy risk and we recommend adjusting this setting.', {header: header, expected: option});
+ 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});
if(xhr.getResponseHeader(header) && securityHeaders[header].length > 1 && xhr.getResponseHeader(header).toLowerCase() === securityHeaders[header][1].toLowerCase()) {
- msg = t('core', 'The "{header}" HTTP header is not configured to equal to "{expected}". Some features might not work correctly and we recommend adjusting this setting.', {header: header, expected: option});
+ 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});
}
messages.push({
msg: msg,
@@ -304,13 +304,13 @@
var minimumSeconds = 15552000;
if(isNaN(transportSecurityValidity) || transportSecurityValidity <= (minimumSeconds - 1)) {
messages.push({
- msg: t('core', 'The "Strict-Transport-Security" HTTP header is not configured to at least "{seconds}" seconds. For enhanced security we recommend enabling HSTS as described in our <a href="{docUrl}" rel="noreferrer noopener">security tips</a>.', {'seconds': minimumSeconds, docUrl: tipsUrl}),
+ 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 <a href="{docUrl}" rel="noreferrer noopener">security tips</a>.', {'seconds': minimumSeconds, docUrl: tipsUrl}),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
});
}
} else {
messages.push({
- msg: t('core', 'You are accessing this site via HTTP. We strongly suggest you configure your server to require using HTTPS instead as described in our <a href="{docUrl}">security tips</a>.', {docUrl: tipsUrl}),
+ msg: t('core', 'Accessing site insecurely via HTTP. You are strongly adviced to set up your server to require HTTPS instead, as described in the <a href="{docUrl}">security tips</a>.', {docUrl: tipsUrl}),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
});
}
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index 3df676099b7..0114f7d868f 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -30,7 +30,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'Your web server is not yet set up properly to allow file synchronization because the WebDAV interface seems to be broken.',
+ msg: 'Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.',
type: OC.SetupChecks.MESSAGE_TYPE_ERROR
}]);
done();
@@ -68,7 +68,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'Your web server is not set up properly to resolve "/.well-known/caldav/". Further information can be found in our <a href="http://example.org/admin-setup-well-known-URL" rel="noreferrer noopener">documentation</a>.',
+ msg: 'Your web server is not properly set up to resolve "/.well-known/caldav/". Further information can be found in the <a href="http://example.org/admin-setup-well-known-URL" rel="noreferrer noopener">documentation</a>.',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();
@@ -108,7 +108,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([
{
- msg: 'Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working. It is strongly recommended that you configure your web server in a way that the data directory is no longer accessible or you move the data directory outside the web server document root.',
+ msg: '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.',
type: OC.SetupChecks.MESSAGE_TYPE_ERROR
}]);
done();
@@ -163,10 +163,10 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([
{
- msg: 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable Internet connection for this server if you want to have all features.',
+ msg: 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the Internet to enjoy all features.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}, {
- msg: 'No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our <a href="https://docs.nextcloud.com/server/go.php?to=admin-performance" rel="noreferrer noopener">documentation</a>.',
+ msg: 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the <a href="https://docs.nextcloud.com/server/go.php?to=admin-performance" rel="noreferrer noopener">documentation</a>.',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();
@@ -196,11 +196,11 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([
{
- msg: 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable Internet connection for this server if you want to have all features.',
+ msg: 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the Internet to enjoy all features.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
},
{
- msg: 'No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our <a href="https://docs.nextcloud.com/server/go.php?to=admin-performance" rel="noreferrer noopener">documentation</a>.',
+ msg: 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the <a href="https://docs.nextcloud.com/server/go.php?to=admin-performance" rel="noreferrer noopener">documentation</a>.',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();
@@ -230,7 +230,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([
{
- msg: 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable Internet connection for this server if you want to have all features.',
+ msg: 'This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the Internet to enjoy all features.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}
]);
@@ -261,7 +261,7 @@ 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 our <a href="https://docs.owncloud.org/myDocs.html" rel="noreferrer noopener">documentation</a>.',
+ 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
}]);
done();
@@ -321,7 +321,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'The reverse proxy headers configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If you are not accessing Nextcloud from a trusted proxy, this is a security issue and can allow an attacker to spoof their IP address as visible to Nextcloud. Further information can be found in our <a href="https://docs.owncloud.org/foo/bar.html" rel="noreferrer noopener">documentation</a>.',
+ msg: 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the <a href="https://docs.owncloud.org/foo/bar.html" rel="noreferrer noopener">documentation</a>.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}]);
done();
@@ -351,7 +351,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. We strongly recommend enabling this function.',
+ msg: 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. Enabling this function is strongly recommended.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}]);
done();
@@ -402,7 +402,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'You are currently running PHP 5.4.0. We encourage you to upgrade your PHP version to take advantage of <a href="https://secure.php.net/supported-versions.php" rel="noreferrer noopener">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.',
+ msg: 'You are currently running PHP 5.4.0. Upgrade your PHP version to take advantage of <a href="https://secure.php.net/supported-versions.php" rel="noreferrer noopener">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();
@@ -433,7 +433,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'The PHP OPcache is not properly configured. <a href="https://example.org/link/to/doc" rel="noreferrer noopener">For better performance we recommend</a> to use following settings in the <code>php.ini</code>:' + "<pre><code>opcache.enable=1\nopcache.enable_cli=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1</code></pre>",
+ msg: 'The PHP OPcache is not properly configured. <a href="https://example.org/link/to/doc" rel="noreferrer noopener">For better performance it is recommended</a> to use the following settings in the <code>php.ini</code>:' + "<pre><code>opcache.enable=1\nopcache.enable_cli=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1</code></pre>",
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();
@@ -479,23 +479,23 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([
{
- msg: 'The "X-XSS-Protection" HTTP header is not configured to equal to "1; mode=block". This is a potential security or privacy risk and we recommend adjusting this setting.',
+ msg: 'The "X-XSS-Protection" HTTP header is not set to "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 "X-Content-Type-Options" HTTP header is not configured to equal to "nosniff". This is a potential security or privacy risk and we recommend adjusting this setting.',
+ 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-Robots-Tag" HTTP header is not configured to equal to "none". This is a potential security or privacy risk and we recommend adjusting this setting.',
+ 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.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}, {
- msg: 'The "X-Frame-Options" HTTP header is not configured to equal to "SAMEORIGIN". This is a potential security or privacy risk and we recommend adjusting this setting.',
+ 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.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}, {
- msg: 'The "X-Download-Options" HTTP header is not configured to equal to "noopen". This is a potential security or privacy risk and we recommend adjusting this setting.',
+ msg: 'The "X-Download-Options" HTTP header is not set to "noopen". 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-Permitted-Cross-Domain-Policies" HTTP header is not configured to equal to "none". This is a potential security or privacy risk and we recommend adjusting this setting.',
+ 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
},
]);
@@ -520,10 +520,10 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'The "X-XSS-Protection" HTTP header is not configured to equal to "1; mode=block". This is a potential security or privacy risk and we recommend adjusting this setting.',
+ msg: 'The "X-XSS-Protection" HTTP header is not set to "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 "X-Content-Type-Options" HTTP header is not configured to equal to "nosniff". This is a potential security or privacy risk and we recommend adjusting this setting.',
+ 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
}]);
done();
@@ -571,7 +571,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'You are accessing this site via HTTP. We strongly suggest you configure your server to require using HTTPS instead as described in our <a href="http://localhost/index.php/settings/admin/tips-tricks">security tips</a>.',
+ msg: 'Accessing site insecurely via HTTP. You are strongly adviced to set up your server to require HTTPS instead, as described in the <a href="http://localhost/index.php/settings/admin/tips-tricks">security tips</a>.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}]);
done();
@@ -617,7 +617,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15552000" seconds. For enhanced security we recommend enabling HSTS as described in our <a rel="noreferrer noopener" href="http://localhost/index.php/settings/admin/tips-tricks">security tips</a>.',
+ msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the <a rel="noreferrer noopener" href="http://localhost/index.php/settings/admin/tips-tricks">security tips</a>.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}]);
done();
@@ -642,7 +642,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15552000" seconds. For enhanced security we recommend enabling HSTS as described in our <a rel="noreferrer noopener" href="http://localhost/index.php/settings/admin/tips-tricks">security tips</a>.',
+ msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the <a rel="noreferrer noopener" href="http://localhost/index.php/settings/admin/tips-tricks">security tips</a>.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}]);
done();
@@ -667,7 +667,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'The "Strict-Transport-Security" HTTP header is not configured to at least "15552000" seconds. For enhanced security we recommend enabling HSTS as described in our <a rel="noreferrer noopener" href="http://localhost/index.php/settings/admin/tips-tricks">security tips</a>.',
+ msg: 'The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the <a rel="noreferrer noopener" href="http://localhost/index.php/settings/admin/tips-tricks">security tips</a>.',
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}]);
done();
diff --git a/core/l10n/lt_LT.js b/core/l10n/lt_LT.js
index 33da59cf60d..bbef29a834c 100644
--- a/core/l10n/lt_LT.js
+++ b/core/l10n/lt_LT.js
@@ -83,7 +83,7 @@ OC.L10N.register(
"Reset password" : "Atstatyti slaptažodį",
"No" : "Ne",
"Yes" : "Taip",
- "No files in here" : "Duomenų nėra",
+ "No files in here" : "Čia failų nėra",
"Choose" : "Pasirinkti",
"Copy" : "Kopijuoti",
"Move" : "Perkelti",
@@ -185,7 +185,7 @@ OC.L10N.register(
"Collaborative tags" : "Žymes skirtos dalinimuisi su kitais asmenimis",
"No tags found" : "Nerasta jokių žymių",
"unknown text" : "nežinomas tekstas",
- "Hello world!" : "Sveikas pasauli!",
+ "Hello world!" : "Sveikas, pasauli!",
"sunny" : "saulėta",
"Hello {name}, the weather is {weather}" : "Sveiki {name}, šiandienos oras yra {weather}",
"Hello {name}" : "Sveiki, {name},",
@@ -227,6 +227,7 @@ OC.L10N.register(
"Trace" : "Sekti",
"Security warning" : "Saugumo įspėjimas",
"Your data directory and files are probably accessible from the internet because the .htaccess file does not work." : "Jūsų duomenų katalogas ir failai, tikriausiai, yra prieinami per internetą, nes .htaccess failas neveikia.",
+ "For information how to properly configure your server, please see the <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">documentation</a>." : "Išsamesnei informacijai apie tai kaip tinkamai sukonfigūruoti savo serverį, žiūrėkite <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">dokumentaciją</a>.",
"Create an <strong>admin account</strong>" : "Sukurkite <strong>administratoriaus paskyrą</strong>",
"Username" : "Naudotojo vardas",
"Storage & database" : "Saugykla ir duomenų bazė",
@@ -262,9 +263,12 @@ OC.L10N.register(
"Wrong password." : "Neteisingas slaptažodis.",
"Log in" : "Prisijungti",
"Stay logged in" : "Likti prisijungus",
+ "Forgot password?" : "Pamiršote slaptažodį?",
+ "Back to log in" : "Grįžti prie prisijungimo",
"Alternative Logins" : "Alternatyvūs prisijungimai",
"Account access" : "Paskyros prieiga",
"You are about to grant %s access to your %s account." : "Jūs ketinate suteikti %s prieigą prie savo %s paskyros.",
+ "Grant access" : "Suteikti prieigą",
"App token" : "Išorinės sistemos įskiepio kodas",
"Alternative login using app token" : "Alternatyvus prisijungimas naudojant išorinės sistemos kodą",
"Redirecting …" : "Nukreipiama...",
@@ -351,6 +355,6 @@ OC.L10N.register(
"Please use the command line updater because you have a big instance." : "Prašome atnaujinti per komandinę eilutę, nes jūsų sistema yra didelė.",
"For help, see the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">documentation</a>." : "Detalesnės informacijos ieškokite <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">dokumentacijoje</a>",
"The PHP OPcache is not properly configured. <a target=\"_blank\" rel=\"noreferrer\" href=\"{docLink}\">For better performance we recommend</a> to use following settings in the <code>php.ini</code>:" : "PHP OPcache yra neteisingai sukonfigūruotas. <a target=\"_blank\" rel=\"noreferrer\" href=\"{docLink}\">Siekiant geresnio sistemos našumo rekomenduojame</a> įrašyti šiuos nustatymus <code>php.ini</code> byloje:",
- "You are about to grant \"%s\" access to your %s account." : "Leisite \"%s\" naudoti jūsų %s paskyrą."
+ "You are about to grant \"%s\" access to your %s account." : "Ketinate suteikti \"%s\" prieigą prie savo %s paskyros."
},
"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/core/l10n/lt_LT.json b/core/l10n/lt_LT.json
index 8b59920d2ea..a1433b29303 100644
--- a/core/l10n/lt_LT.json
+++ b/core/l10n/lt_LT.json
@@ -81,7 +81,7 @@
"Reset password" : "Atstatyti slaptažodį",
"No" : "Ne",
"Yes" : "Taip",
- "No files in here" : "Duomenų nėra",
+ "No files in here" : "Čia failų nėra",
"Choose" : "Pasirinkti",
"Copy" : "Kopijuoti",
"Move" : "Perkelti",
@@ -183,7 +183,7 @@
"Collaborative tags" : "Žymes skirtos dalinimuisi su kitais asmenimis",
"No tags found" : "Nerasta jokių žymių",
"unknown text" : "nežinomas tekstas",
- "Hello world!" : "Sveikas pasauli!",
+ "Hello world!" : "Sveikas, pasauli!",
"sunny" : "saulėta",
"Hello {name}, the weather is {weather}" : "Sveiki {name}, šiandienos oras yra {weather}",
"Hello {name}" : "Sveiki, {name},",
@@ -225,6 +225,7 @@
"Trace" : "Sekti",
"Security warning" : "Saugumo įspėjimas",
"Your data directory and files are probably accessible from the internet because the .htaccess file does not work." : "Jūsų duomenų katalogas ir failai, tikriausiai, yra prieinami per internetą, nes .htaccess failas neveikia.",
+ "For information how to properly configure your server, please see the <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">documentation</a>." : "Išsamesnei informacijai apie tai kaip tinkamai sukonfigūruoti savo serverį, žiūrėkite <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">dokumentaciją</a>.",
"Create an <strong>admin account</strong>" : "Sukurkite <strong>administratoriaus paskyrą</strong>",
"Username" : "Naudotojo vardas",
"Storage & database" : "Saugykla ir duomenų bazė",
@@ -260,9 +261,12 @@
"Wrong password." : "Neteisingas slaptažodis.",
"Log in" : "Prisijungti",
"Stay logged in" : "Likti prisijungus",
+ "Forgot password?" : "Pamiršote slaptažodį?",
+ "Back to log in" : "Grįžti prie prisijungimo",
"Alternative Logins" : "Alternatyvūs prisijungimai",
"Account access" : "Paskyros prieiga",
"You are about to grant %s access to your %s account." : "Jūs ketinate suteikti %s prieigą prie savo %s paskyros.",
+ "Grant access" : "Suteikti prieigą",
"App token" : "Išorinės sistemos įskiepio kodas",
"Alternative login using app token" : "Alternatyvus prisijungimas naudojant išorinės sistemos kodą",
"Redirecting …" : "Nukreipiama...",
@@ -349,6 +353,6 @@
"Please use the command line updater because you have a big instance." : "Prašome atnaujinti per komandinę eilutę, nes jūsų sistema yra didelė.",
"For help, see the <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">documentation</a>." : "Detalesnės informacijos ieškokite <a target=\"_blank\" rel=\"noreferrer\" href=\"%s\">dokumentacijoje</a>",
"The PHP OPcache is not properly configured. <a target=\"_blank\" rel=\"noreferrer\" href=\"{docLink}\">For better performance we recommend</a> to use following settings in the <code>php.ini</code>:" : "PHP OPcache yra neteisingai sukonfigūruotas. <a target=\"_blank\" rel=\"noreferrer\" href=\"{docLink}\">Siekiant geresnio sistemos našumo rekomenduojame</a> įrašyti šiuos nustatymus <code>php.ini</code> byloje:",
- "You are about to grant \"%s\" access to your %s account." : "Leisite \"%s\" naudoti jūsų %s paskyrą."
+ "You are about to grant \"%s\" access to your %s account." : "Ketinate suteikti \"%s\" prieigą prie savo %s paskyros."
},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);"
} \ No newline at end of file
diff --git a/core/register_command.php b/core/register_command.php
index 3f7fbf508e5..60e151a5f2c 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -137,7 +137,7 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
$application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
$application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
- $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger()));
+ $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class)));
$application->add(new OC\Core\Command\Maintenance\Repair(
new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(),
\OC::$server->getEventDispatcher(), \OC::$server->getAppManager()));
diff --git a/lib/base.php b/lib/base.php
index dc09d0f533d..f6b4f5555eb 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -730,7 +730,7 @@ class OC {
OC_User::setIncognitoMode(true);
}
- self::registerCacheHooks();
+ self::registerCleanupHooks();
self::registerFilesystemHooks();
self::registerShareHooks();
self::registerEncryptionWrapper();
@@ -802,15 +802,23 @@ class OC {
}
/**
- * register hooks for the cache
+ * register hooks for the cleanup of cache and bruteforce protection
*/
- public static function registerCacheHooks() {
+ public static function registerCleanupHooks() {
//don't try to do this before we are properly setup
if (\OC::$server->getSystemConfig()->getValue('installed', false) && !self::checkUpgrade(false)) {
// NOTE: This will be replaced to use OCP
$userSession = self::$server->getUserSession();
- $userSession->listen('\OC\User', 'postLogin', function () {
+ $userSession->listen('\OC\User', 'postLogin', function () use ($userSession) {
+ if (!defined('PHPUNIT_RUN')) {
+ // reset brute force delay for this IP address and username
+ $uid = \OC::$server->getUserSession()->getUser()->getUID();
+ $request = \OC::$server->getRequest();
+ $throttler = \OC::$server->getBruteForceThrottler();
+ $throttler->resetDelay($request->getRemoteAddress(), 'login', ['user' => $uid]);
+ }
+
try {
$cache = new \OC\Cache\File();
$cache->gc();
@@ -915,9 +923,15 @@ class OC {
// Check if Nextcloud is installed or in maintenance (update) mode
if (!$systemConfig->getValue('installed', false)) {
\OC::$server->getSession()->clear();
- $setupHelper = new OC\Setup(\OC::$server->getSystemConfig(), \OC::$server->getIniWrapper(),
- \OC::$server->getL10N('lib'), \OC::$server->query(\OCP\Defaults::class), \OC::$server->getLogger(),
- \OC::$server->getSecureRandom());
+ $setupHelper = new OC\Setup(
+ \OC::$server->getSystemConfig(),
+ \OC::$server->getIniWrapper(),
+ \OC::$server->getL10N('lib'),
+ \OC::$server->query(\OCP\Defaults::class),
+ \OC::$server->getLogger(),
+ \OC::$server->getSecureRandom(),
+ \OC::$server->query(\OC\Installer::class)
+ );
$controller = new OC\Core\Controller\SetupController($setupHelper);
$controller->run($_POST);
exit();
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index 93c139b7bbe..81dad9890b5 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -540,7 +540,6 @@ return array(
'OC\\DB\\Migrator' => $baseDir . '/lib/private/DB/Migrator.php',
'OC\\DB\\MySQLMigrator' => $baseDir . '/lib/private/DB/MySQLMigrator.php',
'OC\\DB\\MySqlTools' => $baseDir . '/lib/private/DB/MySqlTools.php',
- 'OC\\DB\\OCPostgreSqlPlatform' => $baseDir . '/lib/private/DB/OCPostgreSqlPlatform.php',
'OC\\DB\\OCSqlitePlatform' => $baseDir . '/lib/private/DB/OCSqlitePlatform.php',
'OC\\DB\\OracleConnection' => $baseDir . '/lib/private/DB/OracleConnection.php',
'OC\\DB\\OracleMigrator' => $baseDir . '/lib/private/DB/OracleMigrator.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index c073d43ca14..b926100365b 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -570,7 +570,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\DB\\Migrator' => __DIR__ . '/../../..' . '/lib/private/DB/Migrator.php',
'OC\\DB\\MySQLMigrator' => __DIR__ . '/../../..' . '/lib/private/DB/MySQLMigrator.php',
'OC\\DB\\MySqlTools' => __DIR__ . '/../../..' . '/lib/private/DB/MySqlTools.php',
- 'OC\\DB\\OCPostgreSqlPlatform' => __DIR__ . '/../../..' . '/lib/private/DB/OCPostgreSqlPlatform.php',
'OC\\DB\\OCSqlitePlatform' => __DIR__ . '/../../..' . '/lib/private/DB/OCSqlitePlatform.php',
'OC\\DB\\OracleConnection' => __DIR__ . '/../../..' . '/lib/private/DB/OracleConnection.php',
'OC\\DB\\OracleMigrator' => __DIR__ . '/../../..' . '/lib/private/DB/OracleMigrator.php',
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php
index 3fca122d287..36a8b1d5464 100644
--- a/lib/private/Authentication/Token/DefaultTokenProvider.php
+++ b/lib/private/Authentication/Token/DefaultTokenProvider.php
@@ -97,6 +97,7 @@ class DefaultTokenProvider implements IProvider {
$dbToken->setType($type);
$dbToken->setRemember($remember);
$dbToken->setLastActivity($this->time->getTime());
+ $dbToken->setLastCheck($this->time->getTime());
$this->mapper->insert($dbToken);
diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php
index 082e81dfa74..fcb0117a0db 100644
--- a/lib/private/DB/ConnectionFactory.php
+++ b/lib/private/DB/ConnectionFactory.php
@@ -139,9 +139,6 @@ class ConnectionFactory {
unset($additionalConnectionParams['host']);
break;
- case 'pgsql':
- $additionalConnectionParams['platform'] = new OCPostgreSqlPlatform();
- break;
case 'sqlite3':
$journalMode = $additionalConnectionParams['sqlite.journal_mode'];
$additionalConnectionParams['platform'] = new OCSqlitePlatform();
diff --git a/lib/private/DB/OCPostgreSqlPlatform.php b/lib/private/DB/OCPostgreSqlPlatform.php
deleted file mode 100644
index e66ab84252a..00000000000
--- a/lib/private/DB/OCPostgreSqlPlatform.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2017, ownCloud GmbH
- *
- * @author Joas Schilling <coding@schilljs.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OC\DB;
-
-use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
-use Doctrine\DBAL\Schema\ColumnDiff;
-use Doctrine\DBAL\Schema\TableDiff;
-use Doctrine\DBAL\Types\Type;
-
-class OCPostgreSqlPlatform extends PostgreSqlPlatform {
-
- /**
- * {@inheritDoc}
- */
- public function getAlterTableSQL(TableDiff $diff){
- $queries = parent::getAlterTableSQL($diff);
- foreach ($queries as $index => $sql){
- // BIGSERIAL could not be used in statements altering column type
- // That's why we replace it with BIGINT
- // see https://github.com/owncloud/core/pull/28364#issuecomment-315006853
- if (preg_match('|(ALTER TABLE\s+\S+\s+ALTER\s+\S+\s+TYPE\s+)(BIGSERIAL)|i', $sql, $matches)) {
- $alterTable = $matches[1];
- $queries[$index] = $alterTable . 'BIGINT';
- }
-
- // Changing integer to bigint kills next autoincrement value
- // see https://github.com/owncloud/core/pull/28364#issuecomment-315006853
- if (preg_match('|ALTER TABLE\s+(\S+)\s+ALTER\s+(\S+)\s+DROP DEFAULT|i', $sql, $matches)) {
- $queryColumnName = $matches[2];
- $columnDiff = $this->findColumnDiffByName($diff, $queryColumnName);
- if ($columnDiff && $this->shouldSkipDropDefault($columnDiff)) {
- unset($queries[$index]);
- continue;
- }
- }
- }
-
- return $queries;
- }
-
- /**
- * We should NOT drop next sequence value if
- * - type was changed from INTEGER to BIGINT
- * - column keeps an autoincrement
- * - default value is kept NULL
- *
- * @param ColumnDiff $columnDiff
- * @return bool
- */
- private function shouldSkipDropDefault(ColumnDiff $columnDiff) {
- $column = $columnDiff->column;
- $fromColumn = $columnDiff->fromColumn;
- return $fromColumn->getType()->getName() === Type::INTEGER
- && $column->getType()->getName() === Type::BIGINT
- && $fromColumn->getDefault() === null
- && $column->getDefault() === null
- && $fromColumn->getAutoincrement()
- && $column->getAutoincrement();
- }
-
- /**
- * @param TableDiff $diff
- * @param string $name
- * @return ColumnDiff | false
- */
- private function findColumnDiffByName(TableDiff $diff, $name) {
- foreach ($diff->changedColumns as $columnDiff) {
- $oldColumnName = $columnDiff->getOldColumnName()->getQuotedName($this);
- if ($oldColumnName === $name) {
- return $columnDiff;
- }
- }
- return false;
- }
-}
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 93af3fcf6b6..cf017c73960 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -259,7 +259,7 @@ class Cache implements ICache {
$data['path'] = $file;
$data['parent'] = $this->getParentId($file);
- $data['name'] = \OC_Util::basename($file);
+ $data['name'] = basename($file);
list($queryParts, $params) = $this->buildParts($data);
$queryParts[] = '`storage`';
@@ -551,7 +551,7 @@ class Cache implements ICache {
}
$sql = 'UPDATE `*PREFIX*filecache` SET `storage` = ?, `path` = ?, `path_hash` = ?, `name` = ?, `parent` = ? WHERE `fileid` = ?';
- $this->connection->executeQuery($sql, array($targetStorageId, $targetPath, md5($targetPath), \OC_Util::basename($targetPath), $newParentId, $sourceId));
+ $this->connection->executeQuery($sql, array($targetStorageId, $targetPath, md5($targetPath), basename($targetPath), $newParentId, $sourceId));
$this->connection->commit();
} else {
$this->moveFromCacheFallback($sourceCache, $sourcePath, $targetPath);
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index e754f28455b..48bd57f4c10 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -67,6 +67,10 @@ class Installer {
private $logger;
/** @var IConfig */
private $config;
+ /** @var array - for caching the result of app fetcher */
+ private $apps = null;
+ /** @var bool|null - for caching the result of the ready status */
+ private $isInstanceReadyForUpdates = null;
/**
* @param AppFetcher $appFetcher
@@ -187,7 +191,7 @@ class Installer {
* @return bool
*/
public function updateAppstoreApp($appId) {
- if(self::isUpdateAvailable($appId, $this->appFetcher)) {
+ if($this->isUpdateAvailable($appId)) {
try {
$this->downloadApp($appId);
} catch (\Exception $e) {
@@ -375,27 +379,26 @@ class Installer {
* Check if an update for the app is available
*
* @param string $appId
- * @param AppFetcher $appFetcher
* @return string|false false or the version number of the update
*/
- public static function isUpdateAvailable($appId,
- AppFetcher $appFetcher) {
- static $isInstanceReadyForUpdates = null;
-
- if ($isInstanceReadyForUpdates === null) {
+ public function isUpdateAvailable($appId) {
+ if ($this->isInstanceReadyForUpdates === null) {
$installPath = OC_App::getInstallPath();
if ($installPath === false || $installPath === null) {
- $isInstanceReadyForUpdates = false;
+ $this->isInstanceReadyForUpdates = false;
} else {
- $isInstanceReadyForUpdates = true;
+ $this->isInstanceReadyForUpdates = true;
}
}
- if ($isInstanceReadyForUpdates === false) {
+ if ($this->isInstanceReadyForUpdates === false) {
return false;
}
- $apps = $appFetcher->get();
+ if ($this->apps === null) {
+ $apps = $this->appFetcher->get();
+ }
+
foreach($apps as $app) {
if($app['id'] === $appId) {
$currentVersion = OC_App::getAppVersion($appId);
@@ -589,23 +592,6 @@ class Installer {
}
/**
- * check the code of an app with some static code checks
- * @param string $folder the folder of the app to check
- * @return boolean true for app is o.k. and false for app is not o.k.
- */
- public static function checkCode($folder) {
- // is the code checker enabled?
- if(!\OC::$server->getConfig()->getSystemValue('appcodechecker', false)) {
- return true;
- }
-
- $codeChecker = new CodeChecker(new PrivateCheck(new EmptyCheck()));
- $errors = $codeChecker->analyseFolder(basename($folder), $folder);
-
- return empty($errors);
- }
-
- /**
* @param string $script
*/
private static function includeAppScript($script) {
diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php
index 1626cee8cb3..f08b721d143 100644
--- a/lib/private/Security/Bruteforce/Throttler.php
+++ b/lib/private/Security/Bruteforce/Throttler.php
@@ -243,6 +243,33 @@ class Throttler {
}
/**
+ * Reset the throttling delay for an IP address, action and metadata
+ *
+ * @param string $ip
+ * @param string $action
+ * @param string $metadata
+ */
+ public function resetDelay($ip, $action, $metadata) {
+ $ipAddress = new IpAddress($ip);
+ if ($this->isIPWhitelisted((string)$ipAddress)) {
+ return;
+ }
+
+ $cutoffTime = (new \DateTime())
+ ->sub($this->getCutoff(43200))
+ ->getTimestamp();
+
+ $qb = $this->db->getQueryBuilder();
+ $qb->delete('bruteforce_attempts')
+ ->where($qb->expr()->gt('occurred', $qb->createNamedParameter($cutoffTime)))
+ ->andWhere($qb->expr()->eq('subnet', $qb->createNamedParameter($ipAddress->getSubnet())))
+ ->andWhere($qb->expr()->eq('action', $qb->createNamedParameter($action)))
+ ->andWhere($qb->expr()->eq('metadata', $qb->createNamedParameter(json_encode($metadata))));
+
+ $qb->execute();
+ }
+
+ /**
* Will sleep for the defined amount of time
*
* @param string $ip
diff --git a/lib/private/Server.php b/lib/private/Server.php
index faa0ce2f2ac..0c6338f6a4c 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -1099,6 +1099,16 @@ class Server extends ServerContainer implements IServerContainer {
$c->query(\OCP\Share\IManager::class)
);
});
+
+ $this->registerService(Installer::class, function(Server $c) {
+ return new Installer(
+ $c->getAppFetcher(),
+ $c->getHTTPClientService(),
+ $c->getTempManager(),
+ $c->getLogger(),
+ $c->getConfig()
+ );
+ });
}
/**
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 8214db2d4ef..92246e8322e 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -65,6 +65,8 @@ class Setup {
protected $logger;
/** @var ISecureRandom */
protected $random;
+ /** @var Installer */
+ protected $installer;
/**
* @param SystemConfig $config
@@ -73,13 +75,15 @@ class Setup {
* @param Defaults $defaults
* @param ILogger $logger
* @param ISecureRandom $random
+ * @param Installer $installer
*/
public function __construct(SystemConfig $config,
IniGetWrapper $iniWrapper,
IL10N $l10n,
Defaults $defaults,
ILogger $logger,
- ISecureRandom $random
+ ISecureRandom $random,
+ Installer $installer
) {
$this->config = $config;
$this->iniWrapper = $iniWrapper;
@@ -87,6 +91,7 @@ class Setup {
$this->defaults = $defaults;
$this->logger = $logger;
$this->random = $random;
+ $this->installer = $installer;
}
static protected $dbSetupClasses = [
@@ -371,18 +376,11 @@ class Setup {
// Install shipped apps and specified app bundles
Installer::installShippedApps();
- $installer = new Installer(
- \OC::$server->getAppFetcher(),
- \OC::$server->getHTTPClientService(),
- \OC::$server->getTempManager(),
- \OC::$server->getLogger(),
- \OC::$server->getConfig()
- );
$bundleFetcher = new BundleFetcher(\OC::$server->getL10N('lib'));
$defaultInstallationBundles = $bundleFetcher->getDefaultInstallationBundle();
foreach($defaultInstallationBundles as $bundle) {
try {
- $installer->installAppBundle($bundle);
+ $this->installer->installAppBundle($bundle);
} catch (Exception $e) {}
}
@@ -444,9 +442,15 @@ class Setup {
$webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/';
}
- $setupHelper = new \OC\Setup($config, \OC::$server->getIniWrapper(),
- \OC::$server->getL10N('lib'), \OC::$server->query(Defaults::class), \OC::$server->getLogger(),
- \OC::$server->getSecureRandom());
+ $setupHelper = new \OC\Setup(
+ $config,
+ \OC::$server->getIniWrapper(),
+ \OC::$server->getL10N('lib'),
+ \OC::$server->query(Defaults::class),
+ \OC::$server->getLogger(),
+ \OC::$server->getSecureRandom(),
+ \OC::$server->query(Installer::class)
+ );
$htaccessContent = file_get_contents($setupHelper->pathToHtaccess());
$content = "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####\n";
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index a440c36406b..844b36b2994 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -183,6 +183,9 @@ class DefaultShareProvider implements IShareProvider {
throw new ShareNotFound();
}
+ $mailSendValue = $share->getMailSend();
+ $data['mail_send'] = ($mailSendValue === null) ? true : $mailSendValue;
+
$share = $this->createShare($data);
return $share;
}
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 4a31266bbe8..b22bfbc3878 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -669,26 +669,31 @@ class Manager implements IManager {
$this->eventDispatcher->dispatch('OCP\Share::postShare', $event);
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
- $user = $this->userManager->get($share->getSharedWith());
- if ($user !== null) {
- $emailAddress = $user->getEMailAddress();
- if ($emailAddress !== null && $emailAddress !== '') {
- $userLang = $this->config->getUserValue($share->getSharedWith(), 'core', 'lang', null);
- $l = $this->l10nFactory->get('lib', $userLang);
- $this->sendMailNotification(
- $l,
- $share->getNode()->getName(),
- $this->urlGenerator->linkToRouteAbsolute('files.viewcontroller.showFile', [ 'fileid' => $share->getNode()->getId() ]),
- $share->getSharedBy(),
- $emailAddress,
- $share->getExpirationDate()
- );
- $this->logger->debug('Send share notification to ' . $emailAddress . ' for share with ID ' . $share->getId(), ['app' => 'share']);
+ $mailSend = $share->getMailSend();
+ if($mailSend === true) {
+ $user = $this->userManager->get($share->getSharedWith());
+ if ($user !== null) {
+ $emailAddress = $user->getEMailAddress();
+ if ($emailAddress !== null && $emailAddress !== '') {
+ $userLang = $this->config->getUserValue($share->getSharedWith(), 'core', 'lang', null);
+ $l = $this->l10nFactory->get('lib', $userLang);
+ $this->sendMailNotification(
+ $l,
+ $share->getNode()->getName(),
+ $this->urlGenerator->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $share->getNode()->getId()]),
+ $share->getSharedBy(),
+ $emailAddress,
+ $share->getExpirationDate()
+ );
+ $this->logger->debug('Send share notification to ' . $emailAddress . ' for share with ID ' . $share->getId(), ['app' => 'share']);
+ } else {
+ $this->logger->debug('Share notification not send to ' . $share->getSharedWith() . ' because email address is not set.', ['app' => 'share']);
+ }
} else {
- $this->logger->debug('Share notification not send to ' . $share->getSharedWith() . ' because email address is not set.', ['app' => 'share']);
+ $this->logger->debug('Share notification not send to ' . $share->getSharedWith() . ' because user could not be found.', ['app' => 'share']);
}
} else {
- $this->logger->debug('Share notification not send to ' . $share->getSharedWith() . ' because user could not be found.', ['app' => 'share']);
+ $this->logger->debug('Share notification not send because mailsend is false.', ['app' => 'share']);
}
}
@@ -1390,7 +1395,7 @@ class Manager implements IManager {
foreach ($tmp as $k => $v) {
if (isset($al[$k])) {
if (is_array($al[$k])) {
- $al[$k] = array_merge($al[$k], $v);
+ $al[$k] += $v;
} else {
$al[$k] = $al[$k] || $v;
}
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 4f5bb45ae15..996163daacc 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -63,6 +63,9 @@ class Updater extends BasicEmitter {
/** @var Checker */
private $checker;
+ /** @var Installer */
+ private $installer;
+
/** @var bool */
private $skip3rdPartyAppsDisable;
@@ -78,13 +81,16 @@ class Updater extends BasicEmitter {
* @param IConfig $config
* @param Checker $checker
* @param ILogger $log
+ * @param Installer $installer
*/
public function __construct(IConfig $config,
Checker $checker,
- ILogger $log = null) {
+ ILogger $log = null,
+ Installer $installer) {
$this->log = $log;
$this->config = $config;
$this->checker = $checker;
+ $this->installer = $installer;
// If at least PHP 7.0.0 is used we don't need to disable apps as we catch
// fatal errors and exceptions and disable the app just instead.
@@ -461,17 +467,10 @@ class Updater extends BasicEmitter {
private function upgradeAppStoreApps(array $disabledApps) {
foreach($disabledApps as $app) {
try {
- $installer = new Installer(
- \OC::$server->getAppFetcher(),
- \OC::$server->getHTTPClientService(),
- \OC::$server->getTempManager(),
- $this->log,
- \OC::$server->getConfig()
- );
$this->emit('\OC\Updater', 'checkAppStoreAppBefore', [$app]);
- if (Installer::isUpdateAvailable($app, \OC::$server->getAppFetcher())) {
+ if ($this->installer->isUpdateAvailable($app)) {
$this->emit('\OC\Updater', 'upgradeAppStoreApp', [$app]);
- $installer->updateAppstoreApp($app);
+ $this->installer->updateAppstoreApp($app);
}
$this->emit('\OC\Updater', 'checkAppStoreApp', [$app]);
} catch (\Exception $ex) {
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index d2b0f96d593..1b9fc28873e 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -375,13 +375,7 @@ class OC_App {
self::$enabledAppsCache = []; // flush
// Check if app is already downloaded
- $installer = new Installer(
- \OC::$server->getAppFetcher(),
- \OC::$server->getHTTPClientService(),
- \OC::$server->getTempManager(),
- \OC::$server->getLogger(),
- \OC::$server->getConfig()
- );
+ $installer = \OC::$server->query(Installer::class);
$isDownloaded = $installer->isDownloaded($appId);
if(!$isDownloaded) {
@@ -415,13 +409,7 @@ class OC_App {
return false;
}
- $installer = new Installer(
- \OC::$server->getAppFetcher(),
- \OC::$server->getHTTPClientService(),
- \OC::$server->getTempManager(),
- \OC::$server->getLogger(),
- \OC::$server->getConfig()
- );
+ $installer = \OC::$server->query(Installer::class);
return $installer->removeApp($app);
}
diff --git a/lib/private/legacy/image.php b/lib/private/legacy/image.php
index fe9f054f5d4..a7d702ac032 100644
--- a/lib/private/legacy/image.php
+++ b/lib/private/legacy/image.php
@@ -63,22 +63,6 @@ class OC_Image implements \OCP\IImage {
private $exif;
/**
- * Get mime type for an image file.
- *
- * @param string|null $filePath The path to a local image file.
- * @return string The mime type if the it could be determined, otherwise an empty string.
- */
- static public function getMimeTypeForFile($filePath) {
- // exif_imagetype throws "read error!" if file is less than 12 byte
- if ($filePath !== null && filesize($filePath) > 11) {
- $imageType = exif_imagetype($filePath);
- } else {
- $imageType = false;
- }
- return $imageType ? image_type_to_mime_type($imageType) : '';
- }
-
- /**
* Constructor.
*
* @param resource|string $imageRef The path to a local file, a base64 encoded string or a resource created by
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index 2610ec3a7b6..3ce11746672 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -708,8 +708,15 @@ class OC_Util {
}
$webServerRestart = false;
- $setup = new \OC\Setup($config, \OC::$server->getIniWrapper(), \OC::$server->getL10N('lib'),
- \OC::$server->query(\OCP\Defaults::class), \OC::$server->getLogger(), \OC::$server->getSecureRandom());
+ $setup = new \OC\Setup(
+ $config,
+ \OC::$server->getIniWrapper(),
+ \OC::$server->getL10N('lib'),
+ \OC::$server->query(\OCP\Defaults::class),
+ \OC::$server->getLogger(),
+ \OC::$server->getSecureRandom(),
+ \OC::$server->query(\OC\Installer::class)
+ );
$urlGenerator = \OC::$server->getURLGenerator();
@@ -1408,16 +1415,6 @@ class OC_Util {
}
/**
- * @param boolean|string $file
- * @return string
- */
- public static function basename($file) {
- $file = rtrim($file, '/');
- $t = explode('/', $file);
- return array_pop($t);
- }
-
- /**
* A human readable string is generated based on version and build number
*
* @return string
diff --git a/resources/codesigning/root.crl b/resources/codesigning/root.crl
index 31f8055e3b1..37771fe17f5 100644
--- a/resources/codesigning/root.crl
+++ b/resources/codesigning/root.crl
@@ -1,14 +1,15 @@
-----BEGIN X509 CRL-----
-MIICIzCCAQsCAQEwDQYJKoZIhvcNAQELBQAwezELMAkGA1UEBhMCREUxGzAZBgNV
+MIICTTCCATUCAQEwDQYJKoZIhvcNAQELBQAwezELMAkGA1UEBhMCREUxGzAZBgNV
BAgMEkJhZGVuLVd1ZXJ0dGVtYmVyZzEXMBUGA1UECgwOTmV4dGNsb3VkIEdtYkgx
NjA0BgNVBAMMLU5leHRjbG91ZCBDb2RlIFNpZ25pbmcgSW50ZXJtZWRpYXRlIEF1
-dGhvcml0eRcNMTcwMjIwMTAwODU2WhcNMjYxMjMwMTAwODU2WjAqMBMCAhAQFw0x
-NjEwMTcxMjA5MTlaMBMCAhAXFw0xNzAyMjAxMDAyMzhaoDAwLjAfBgNVHSMEGDAW
-gBRt6m6qqTcsPIktFz79Ru7DnnjtdDALBgNVHRQEBAICEAQwDQYJKoZIhvcNAQEL
-BQADggEBAC94bDgg/jGNTgp+L4I4GoZtfVQI9E0NbFyb2pBdAHA9vOcwvIYaaaB5
-b2hi5Ath/2o5/1OcnTJ8B5RPIoRu/2XOXiMXEH1ilS89VPYjNUUmEWmfFLKm8rWx
-Z91cIBCeSDITDfYC+yG+QjVsl7YY60P7fduajZXdSD1ZtHravczVFXzilbafvFex
-eim9jF+lANeFoTtFcmWCyUM/ys/qKagFBmkLkuxrYerWEMrNy6QNwc5dnL0LtPag
-3aYRVY9qGqFWKFA0zg6dge4n9iZVkwczJME8AuKh2sRsqCmadx7QGqzkJWWXAAFi
-j0Ixr7s4a90qFE1dE5v/SukfWeUH1Wg=
+dGhvcml0eRcNMTcxMTIzMTczNTM5WhcNMjcxMDAyMTczNTM5WjBUMBMCAhAQFw0x
+NjEwMTcxMjA5MTlaMBMCAhAWFw0xNzExMjMxNzM1MjlaMBMCAhAXFw0xNzAyMjAx
+MDAyMzhaMBMCAhB0Fw0xNzExMjMxNjU0NTlaoDAwLjAfBgNVHSMEGDAWgBRt6m6q
+qTcsPIktFz79Ru7DnnjtdDALBgNVHRQEBAICEAYwDQYJKoZIhvcNAQELBQADggEB
+AEyAv2ANT2ar+Xhrhs+10wuOJtjfdHdz376CDIMnsL+NsO/ae3NqhEY9phKA/wEd
+UThFmx4Zx58BdgGTnighRB9anVUbtK5q2eqaVSZ5tdwOkbDRAEIBxwmiMMrGrrTr
+Q6vgg6bb4nFNaDxjfn3Ba0QgsMexZhCITJ96Q6wtnsfX5kiKFukdL75xDdyUNrzX
+ZrKlDwBi+4t5+O936krjEMjF0Sg6+Qs+9hszwvUen8rpB6rouRsMMhJuSg8UFTFQ
+oJG4W0jwCsCGNfd9jXDF72i6nZ1q5eJgfYj818UcnpT3e1NLBFV1/U9IpJyw3Aeq
+HLoWTBBjervElnqYoPRlqcA=
-----END X509 CRL-----
diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php
index 26858eabcf3..f2a92b52f6d 100644
--- a/settings/Controller/AppSettingsController.php
+++ b/settings/Controller/AppSettingsController.php
@@ -37,6 +37,7 @@ use OC\App\AppStore\Fetcher\CategoryFetcher;
use OC\App\AppStore\Version\VersionParser;
use OC\App\DependencyAnalyzer;
use OC\App\Platform;
+use OC\Installer;
use OCP\App\IAppManager;
use \OCP\AppFramework\Controller;
use OCP\AppFramework\Http\ContentSecurityPolicy;
@@ -74,6 +75,8 @@ class AppSettingsController extends Controller {
private $l10nFactory;
/** @var BundleFetcher */
private $bundleFetcher;
+ /** @var Installer */
+ private $installer;
/**
* @param string $appName
@@ -86,6 +89,7 @@ class AppSettingsController extends Controller {
* @param AppFetcher $appFetcher
* @param IFactory $l10nFactory
* @param BundleFetcher $bundleFetcher
+ * @param Installer $installer
*/
public function __construct($appName,
IRequest $request,
@@ -96,7 +100,8 @@ class AppSettingsController extends Controller {
CategoryFetcher $categoryFetcher,
AppFetcher $appFetcher,
IFactory $l10nFactory,
- BundleFetcher $bundleFetcher) {
+ BundleFetcher $bundleFetcher,
+ Installer $installer) {
parent::__construct($appName, $request);
$this->l10n = $l10n;
$this->config = $config;
@@ -106,6 +111,7 @@ class AppSettingsController extends Controller {
$this->appFetcher = $appFetcher;
$this->l10nFactory = $l10nFactory;
$this->bundleFetcher = $bundleFetcher;
+ $this->installer = $installer;
}
/**
@@ -270,8 +276,7 @@ class AppSettingsController extends Controller {
];
- $appFetcher = \OC::$server->getAppFetcher();
- $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $appFetcher);
+ $newVersion = $this->installer->isUpdateAvailable($app['id']);
if($newVersion && $this->appManager->isInstalled($app['id'])) {
$formattedApps[count($formattedApps)-1]['update'] = $newVersion;
}
@@ -284,7 +289,7 @@ class AppSettingsController extends Controller {
$appClass = new \OC_App();
$apps = $appClass->listAllApps();
foreach($apps as $key => $app) {
- $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher);
+ $newVersion = $this->installer->isUpdateAvailable($app['id']);
if($newVersion !== false) {
$apps[$key]['update'] = $newVersion;
} else {
@@ -317,7 +322,7 @@ class AppSettingsController extends Controller {
$apps = $appClass->listAllApps();
foreach($apps as $key => $app) {
- $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher);
+ $newVersion = $this->installer->isUpdateAvailable($app['id']);
$apps[$key]['update'] = $newVersion;
}
@@ -342,7 +347,7 @@ class AppSettingsController extends Controller {
});
foreach($apps as $key => $app) {
- $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher);
+ $newVersion = $this->installer->isUpdateAvailable($app['id']);
$apps[$key]['update'] = $newVersion;
}
@@ -363,7 +368,7 @@ class AppSettingsController extends Controller {
});
$apps = array_map(function ($app) {
- $newVersion = \OC\Installer::isUpdateAvailable($app['id'], $this->appFetcher);
+ $newVersion = $this->installer->isUpdateAvailable($app['id']);
if ($newVersion !== false) {
$app['update'] = $newVersion;
}
diff --git a/settings/ajax/updateapp.php b/settings/ajax/updateapp.php
index 7b615cb56bb..3431c68dbd7 100644
--- a/settings/ajax/updateapp.php
+++ b/settings/ajax/updateapp.php
@@ -41,13 +41,7 @@ $appId = OC_App::cleanAppId($appId);
$config = \OC::$server->getConfig();
$config->setSystemValue('maintenance', true);
try {
- $installer = new \OC\Installer(
- \OC::$server->getAppFetcher(),
- \OC::$server->getHTTPClientService(),
- \OC::$server->getTempManager(),
- \OC::$server->getLogger(),
- \OC::$server->getConfig()
- );
+ $installer = \OC::$server->query(\OC\Installer::class);
$result = $installer->updateAppstoreApp($appId);
$config->setSystemValue('maintenance', false);
} catch(Exception $ex) {
diff --git a/settings/l10n/da.js b/settings/l10n/da.js
index 1971b7831e6..323cf4683ee 100644
--- a/settings/l10n/da.js
+++ b/settings/l10n/da.js
@@ -101,17 +101,23 @@ OC.L10N.register(
"Enabling app …" : "Aktiverer app...",
"Error while enabling app" : "Kunne ikke aktivere app",
"Error: This app can not be enabled because it makes the server unstable" : "Fejl: Denne app kan ikke aktiveres fordi den gør serveren ustabil",
+ "Error: Could not disable broken app" : "Fejl: Kunne ikke deaktivere app",
+ "Error while disabling broken app" : "Fejl under deaktivering af ødelagt app",
+ "No app updates available" : "Ingen app opdateringer tilgængelige",
"Updating...." : "Opdaterer....",
"Error while updating app" : "Der opstod en fejl under app opgraderingen",
"Updated" : "Opdateret",
"Removing …" : "Fjerner...",
+ "Error while removing app" : "Fejl under fjernelse af app",
"Remove" : "Fjern",
"App update" : "App update",
"Approved" : "Godkendt",
"Experimental" : "Eksperimentel",
"No apps found for {query}" : "Ingen apps fundet for {query}",
"Enable all" : "Aktiver alle",
+ "Allow filesystem access" : "Tillad filsystem adgang",
"Disconnect" : "Frakobl",
+ "Revoke" : "Tilbagekald",
"Internet Explorer" : "Internet Explorer",
"Edge" : "Edge",
"Firefox" : "Firefox",
@@ -122,10 +128,14 @@ OC.L10N.register(
"iPad iOS" : "iPad iOS",
"iOS Client" : "iOS Client",
"Android Client" : "Android klient",
+ "Sync client - {os}" : "Synk klient - {os}",
+ "This session" : "Sessionen",
"Copy" : "Kopier",
"Copied!" : "Kopieret",
"Not supported!" : "Ikke understøttet",
+ "Press ⌘-C to copy." : "Tryk ⌘-C for at kopiere.",
"Press Ctrl-C to copy." : "Tryk Ctrl-C for kopi.",
+ "Error while loading browser sessions and device tokens" : "Fejl mens browser sessions og enhed tokens blev loadet.",
"An error occurred. Please upload an ASCII-encoded PEM certificate." : "Der opstod en fejl. Upload venligst et ASCII-indkodet PEM-certifikat.",
"Valid until {date}" : "Gyldig indtil {date}",
"Delete" : "Slet",
diff --git a/settings/l10n/da.json b/settings/l10n/da.json
index 177f07aa791..e328561a6cc 100644
--- a/settings/l10n/da.json
+++ b/settings/l10n/da.json
@@ -99,17 +99,23 @@
"Enabling app …" : "Aktiverer app...",
"Error while enabling app" : "Kunne ikke aktivere app",
"Error: This app can not be enabled because it makes the server unstable" : "Fejl: Denne app kan ikke aktiveres fordi den gør serveren ustabil",
+ "Error: Could not disable broken app" : "Fejl: Kunne ikke deaktivere app",
+ "Error while disabling broken app" : "Fejl under deaktivering af ødelagt app",
+ "No app updates available" : "Ingen app opdateringer tilgængelige",
"Updating...." : "Opdaterer....",
"Error while updating app" : "Der opstod en fejl under app opgraderingen",
"Updated" : "Opdateret",
"Removing …" : "Fjerner...",
+ "Error while removing app" : "Fejl under fjernelse af app",
"Remove" : "Fjern",
"App update" : "App update",
"Approved" : "Godkendt",
"Experimental" : "Eksperimentel",
"No apps found for {query}" : "Ingen apps fundet for {query}",
"Enable all" : "Aktiver alle",
+ "Allow filesystem access" : "Tillad filsystem adgang",
"Disconnect" : "Frakobl",
+ "Revoke" : "Tilbagekald",
"Internet Explorer" : "Internet Explorer",
"Edge" : "Edge",
"Firefox" : "Firefox",
@@ -120,10 +126,14 @@
"iPad iOS" : "iPad iOS",
"iOS Client" : "iOS Client",
"Android Client" : "Android klient",
+ "Sync client - {os}" : "Synk klient - {os}",
+ "This session" : "Sessionen",
"Copy" : "Kopier",
"Copied!" : "Kopieret",
"Not supported!" : "Ikke understøttet",
+ "Press ⌘-C to copy." : "Tryk ⌘-C for at kopiere.",
"Press Ctrl-C to copy." : "Tryk Ctrl-C for kopi.",
+ "Error while loading browser sessions and device tokens" : "Fejl mens browser sessions og enhed tokens blev loadet.",
"An error occurred. Please upload an ASCII-encoded PEM certificate." : "Der opstod en fejl. Upload venligst et ASCII-indkodet PEM-certifikat.",
"Valid until {date}" : "Gyldig indtil {date}",
"Delete" : "Slet",
diff --git a/tests/Settings/Controller/AppSettingsControllerTest.php b/tests/Settings/Controller/AppSettingsControllerTest.php
index e264d0dfbfe..6631873d8ad 100644
--- a/tests/Settings/Controller/AppSettingsControllerTest.php
+++ b/tests/Settings/Controller/AppSettingsControllerTest.php
@@ -25,6 +25,7 @@ namespace Tests\Settings\Controller;
use OC\App\AppStore\Bundles\BundleFetcher;
use OC\App\AppStore\Fetcher\AppFetcher;
use OC\App\AppStore\Fetcher\CategoryFetcher;
+use OC\Installer;
use OC\Settings\Controller\AppSettingsController;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\JSONResponse;
@@ -63,6 +64,8 @@ class AppSettingsControllerTest extends TestCase {
private $l10nFactory;
/** @var BundleFetcher|\PHPUnit_Framework_MockObject_MockObject */
private $bundleFetcher;
+ /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
+ private $installer;
public function setUp() {
parent::setUp();
@@ -79,6 +82,7 @@ class AppSettingsControllerTest extends TestCase {
$this->appFetcher = $this->createMock(AppFetcher::class);
$this->l10nFactory = $this->createMock(IFactory::class);
$this->bundleFetcher = $this->createMock(BundleFetcher::class);
+ $this->installer = $this->createMock(Installer::class);
$this->appSettingsController = new AppSettingsController(
'settings',
@@ -90,11 +94,15 @@ class AppSettingsControllerTest extends TestCase {
$this->categoryFetcher,
$this->appFetcher,
$this->l10nFactory,
- $this->bundleFetcher
+ $this->bundleFetcher,
+ $this->installer
);
}
public function testListCategories() {
+ $this->installer->expects($this->any())
+ ->method('isUpdateAvailable')
+ ->willReturn(false);
$expected = new JSONResponse([
[
'id' => 2,
diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
index 96fdbaa176f..08c74961c0d 100644
--- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
@@ -91,6 +91,7 @@ class DefaultTokenProviderTest extends TestCase {
$toInsert->setType($type);
$toInsert->setRemember(IToken::DO_NOT_REMEMBER);
$toInsert->setLastActivity($this->time);
+ $toInsert->setLastCheck($this->time);
$this->config->expects($this->any())
->method('getSystemValue')
diff --git a/tests/lib/DB/OCPostgreSqlPlatformTest.php b/tests/lib/DB/OCPostgreSqlPlatformTest.php
index 56fab621cfc..54701bdcec9 100644
--- a/tests/lib/DB/OCPostgreSqlPlatformTest.php
+++ b/tests/lib/DB/OCPostgreSqlPlatformTest.php
@@ -18,33 +18,34 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
+
namespace Test\DB;
+use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\Types\Type;
-use OC\DB\OCPostgreSqlPlatform;
-
- /**
+
+/**
* Class OCPostgreSqlPlatformTest
*
+ * custom OCPostgreSqlPlatform behavior has been upstreamed, test is left to
+ * ensure behavior stays correct.
+ *
* @group DB
*
* @package Test\DB
*/
-
class OCPostgreSqlPlatformTest extends \Test\TestCase {
- public function testAlterBigint(){
- $platform = new OCPostgreSqlPlatform();
+ public function testAlterBigint() {
+ $platform = new PostgreSqlPlatform();
$sourceSchema = new Schema();
$targetSchema = new Schema();
-
+
$this->createTableAndColumn($sourceSchema, Type::INTEGER);
$this->createTableAndColumn($targetSchema, Type::BIGINT);
-
+
$comparator = new Comparator();
$diff = $comparator->compare($sourceSchema, $targetSchema);
$sqlStatements = $diff->toSql($platform);
@@ -53,22 +54,22 @@ class OCPostgreSqlPlatformTest extends \Test\TestCase {
$sqlStatements,
true
);
-
+
$this->assertNotContains(
'ALTER TABLE poor_yorick ALTER id DROP DEFAULT',
$sqlStatements,
true
);
}
-
- protected function createTableAndColumn($schema, $type){
+
+ protected function createTableAndColumn($schema, $type) {
$table = $schema->createTable("poor_yorick");
$table->addColumn('id', $type, [
'autoincrement' => true,
- 'unsigned' => true,
- 'notnull' => true,
- 'length' => 11,
+ 'unsigned' => true,
+ 'notnull' => true,
+ 'length' => 11,
]);
}
-
+
}
diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php
index b7255ccdbd6..b4cb57f3787 100644
--- a/tests/lib/ImageTest.php
+++ b/tests/lib/ImageTest.php
@@ -19,20 +19,6 @@ class ImageTest extends \Test\TestCase {
parent::tearDownAfterClass();
}
- public function testGetMimeTypeForFile() {
- $mimetype = \OC_Image::getMimeTypeForFile(OC::$SERVERROOT.'/tests/data/testimage.png');
- $this->assertEquals('image/png', $mimetype);
-
- $mimetype = \OC_Image::getMimeTypeForFile(OC::$SERVERROOT.'/tests/data/testimage.jpg');
- $this->assertEquals('image/jpeg', $mimetype);
-
- $mimetype = \OC_Image::getMimeTypeForFile(OC::$SERVERROOT.'/tests/data/testimage.gif');
- $this->assertEquals('image/gif', $mimetype);
-
- $mimetype = \OC_Image::getMimeTypeForFile(null);
- $this->assertEquals('', $mimetype);
- }
-
public function testConstructDestruct() {
$img = new \OC_Image(OC::$SERVERROOT.'/tests/data/testimage.png');
$this->assertInstanceOf('\OC_Image', $img);
@@ -337,7 +323,6 @@ class ImageTest extends \Test\TestCase {
$tempFile = tempnam(sys_get_temp_dir(), 'img-test');
$img->save($tempFile, $mimeType);
- $actualMimeType = \OC_Image::getMimeTypeForFile($tempFile);
- $this->assertEquals($mimeType, $actualMimeType);
+ $this->assertEquals($mimeType, image_type_to_mime_type(exif_imagetype($tempFile)));
}
}
diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php
index 107b9dcb41f..897bc472103 100644
--- a/tests/lib/InstallerTest.php
+++ b/tests/lib/InstallerTest.php
@@ -40,9 +40,6 @@ class InstallerTest extends TestCase {
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
private $config;
- /** @var Installer */
- private $installer;
-
protected function setUp() {
parent::setUp();
@@ -51,13 +48,6 @@ class InstallerTest extends TestCase {
$this->tempManager = $this->createMock(ITempManager::class);
$this->logger = $this->createMock(ILogger::class);
$this->config = $this->createMock(IConfig::class);
- $this->installer = new Installer(
- $this->appFetcher,
- $this->clientService,
- $this->tempManager,
- $this->logger,
- $this->config
- );
$config = \OC::$server->getConfig();
$this->appstore = $config->setSystemValue('appstoreenabled', true);
@@ -72,6 +62,16 @@ class InstallerTest extends TestCase {
$installer->removeApp(self::$appid);
}
+ protected function getInstaller() {
+ return new Installer(
+ $this->appFetcher,
+ $this->clientService,
+ $this->tempManager,
+ $this->logger,
+ $this->config
+ );
+ }
+
protected function tearDown() {
$installer = new Installer(
\OC::$server->getAppFetcher(),
@@ -154,7 +154,8 @@ class InstallerTest extends TestCase {
->method('get')
->willReturn($appArray);
- $this->assertSame($updateAvailable, Installer::isUpdateAvailable('files', $this->appFetcher));
+ $installer = $this->getInstaller();
+ $this->assertSame($updateAvailable, $installer->isUpdateAvailable('files'));
}
/**
@@ -197,7 +198,8 @@ gLgK8d8sKL60JMmKHN3boHrsThKBVA==
->willReturn($appArray);
- $this->installer->downloadApp('news');
+ $installer = $this->getInstaller();
+ $installer->downloadApp('news');
}
/**
@@ -239,7 +241,8 @@ YSu356M=
->method('get')
->willReturn($appArray);
- $this->installer->downloadApp('news');
+ $installer = $this->getInstaller();
+ $installer->downloadApp('news');
}
/**
@@ -281,7 +284,8 @@ cR92p/PYCFXkAKP3OO0RPlf6dXNKTw==
->method('get')
->willReturn($appArray);
- $this->installer->downloadApp('news');
+ $installer = $this->getInstaller();
+ $installer->downloadApp('news');
}
/**
@@ -348,7 +352,8 @@ cR92p/PYCFXkAKP3OO0RPlf6dXNKTw==
->method('newClient')
->willReturn($client);
- $this->installer->downloadApp('passman');
+ $installer = $this->getInstaller();
+ $installer->downloadApp('passman');
}
/**
@@ -431,7 +436,8 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
->method('newClient')
->willReturn($client);
- $this->installer->downloadApp('testapp');
+ $installer = $this->getInstaller();
+ $installer->downloadApp('testapp');
}
/**
@@ -513,7 +519,8 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
->method('newClient')
->willReturn($client);
- $this->installer->downloadApp('testapp');
+ $installer = $this->getInstaller();
+ $installer->downloadApp('testapp');
}
public function testDownloadAppSuccessful() {
@@ -591,7 +598,8 @@ MPLX6f5V9tCJtlH6ztmEcDROfvuVc0U3rEhqx2hphoyo+MZrPFpdcJL8KkIdMKbY
->method('newClient')
->willReturn($client);
- $this->installer->downloadApp('testapp');
+ $installer = $this->getInstaller();
+ $installer->downloadApp('testapp');
$this->assertTrue(file_exists(__DIR__ . '/../../apps/testapp/appinfo/info.xml'));
$this->assertEquals('0.9', \OC_App::getAppVersionByPath(__DIR__ . '/../../apps/testapp/'));
@@ -679,7 +687,8 @@ JXhrdaWDZ8fzpUjugrtC3qslsqL0dzgU37anS3HwrT8=',
$this->assertTrue(file_exists(__DIR__ . '/../../apps/testapp/appinfo/info.xml'));
$this->assertEquals('0.9', \OC_App::getAppVersionByPath(__DIR__ . '/../../apps/testapp/'));
- $this->installer->downloadApp('testapp');
+ $installer = $this->getInstaller();
+ $installer->downloadApp('testapp');
$this->assertTrue(file_exists(__DIR__ . '/../../apps/testapp/appinfo/info.xml'));
$this->assertEquals('0.8', \OC_App::getAppVersionByPath(__DIR__ . '/../../apps/testapp/'));
}
diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php
index 78c35a5b0bb..e6e9fb5c56c 100644
--- a/tests/lib/SetupTest.php
+++ b/tests/lib/SetupTest.php
@@ -9,6 +9,7 @@
namespace Test;
use bantu\IniGetWrapper\IniGetWrapper;
+use OC\Installer;
use OC\SystemConfig;
use OCP\Defaults;
use OCP\IL10N;
@@ -31,6 +32,8 @@ class SetupTest extends \Test\TestCase {
protected $logger;
/** @var \OCP\Security\ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
protected $random;
+ /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
+ protected $installer;
protected function setUp() {
parent::setUp();
@@ -41,9 +44,10 @@ class SetupTest extends \Test\TestCase {
$this->defaults = $this->createMock(Defaults::class);
$this->logger = $this->createMock(ILogger::class);
$this->random = $this->createMock(ISecureRandom::class);
+ $this->installer = $this->createMock(Installer::class);
$this->setupClass = $this->getMockBuilder('\OC\Setup')
->setMethods(['class_exists', 'is_callable', 'getAvailableDbDriversForPdo'])
- ->setConstructorArgs([$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random])
+ ->setConstructorArgs([$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random, $this->installer])
->getMock();
}
diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php
index afa0635768d..a6a8224ac34 100644
--- a/tests/lib/UpdaterTest.php
+++ b/tests/lib/UpdaterTest.php
@@ -22,6 +22,7 @@
namespace Test;
+use OC\Installer;
use OC\Updater;
use OCP\IConfig;
use OCP\ILogger;
@@ -36,6 +37,8 @@ class UpdaterTest extends TestCase {
private $updater;
/** @var Checker | \PHPUnit_Framework_MockObject_MockObject */
private $checker;
+ /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
+ private $installer;
public function setUp() {
parent::setUp();
@@ -46,13 +49,17 @@ class UpdaterTest extends TestCase {
->disableOriginalConstructor()
->getMock();
$this->checker = $this->getMockBuilder(Checker::class)
- ->disableOriginalConstructor()
- ->getMock();
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->installer = $this->getMockBuilder(Installer::class)
+ ->disableOriginalConstructor()
+ ->getMock();
$this->updater = new Updater(
$this->config,
$this->checker,
- $this->logger
+ $this->logger,
+ $this->installer
);
}
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php
index 49dc4ddebb1..16d03b049fe 100644
--- a/tests/lib/UtilTest.php
+++ b/tests/lib/UtilTest.php
@@ -178,24 +178,6 @@ class UtilTest extends \Test\TestCase {
}
/**
- * @dataProvider baseNameProvider
- */
- public function testBaseName($expected, $file) {
- $base = \OC_Util::basename($file);
- $this->assertEquals($expected, $base);
- }
-
- public function baseNameProvider() {
- return array(
- array('public_html', '/home/user/public_html/'),
- array('public_html', '/home/user/public_html'),
- array('', '/'),
- array('public_html', 'public_html'),
- array('442aa682de2a64db1e010f50e60fd9c9', 'local::C:\Users\ADMINI~1\AppData\Local\Temp\2/442aa682de2a64db1e010f50e60fd9c9/')
- );
- }
-
- /**
* @dataProvider filenameValidationProvider
*/
public function testFilenameValidation($file, $valid) {