diff --git a/admin/osx/CMakeLists.txt b/admin/osx/CMakeLists.txt index 5531223fb8..720015c0dd 100644 --- a/admin/osx/CMakeLists.txt +++ b/admin/osx/CMakeLists.txt @@ -6,13 +6,13 @@ # includes CMAKE_SOURCE_DIR or so. if (DEFINED MAC_INSTALLER_BACKGROUND_FILE ) - set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "1") + set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "true") else() - set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "0") + set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "false") endif() find_package(Qt5 5.6 COMPONENTS Core REQUIRED) -configure_file(create_mac.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh) -configure_file(macosx.pkgproj.cmake ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj) -configure_file(pre_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh) -configure_file(post_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/post_install.sh) +configure_file(create_mac.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh @ONLY) +configure_file(macosx.pkgproj.cmake ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj @ONLY) +configure_file(pre_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh @ONLY) +configure_file(post_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/post_install.sh @ONLY) diff --git a/admin/osx/macosx.pkgproj.cmake b/admin/osx/macosx.pkgproj.cmake index 0552e1c323..762df146e2 100644 --- a/admin/osx/macosx.pkgproj.cmake +++ b/admin/osx/macosx.pkgproj.cmake @@ -5,6 +5,10 @@ PACKAGES + MUST-CLOSE-APPLICATION-ITEMS + + MUST-CLOSE-APPLICATIONS + PACKAGE_FILES DEFAULT_INSTALL_LOCATION @@ -251,7 +255,7 @@ PATH_TYPE 0 PERMISSIONS - 493 + 1005 TYPE 1 UID @@ -353,6 +357,38 @@ UID 0 + + CHILDREN + + GID + 0 + PATH + Automator + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Extensions + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + GID 0 @@ -466,43 +502,65 @@ PAYLOAD_TYPE 0 + PRESERVE_EXTENDED_ATTRIBUTES + + SHOW_INVISIBLE + + SPLIT_FORKS + + TREAT_MISSING_FILES_AS_WARNING + VERSION - 2 + 5 PACKAGE_SCRIPTS - POSTINSTALL_PATH - - PATH - @CMAKE_CURRENT_BINARY_DIR@/post_install.sh - PATH_TYPE - 0 - - PREINSTALL_PATH - - PATH - @CMAKE_CURRENT_BINARY_DIR@/pre_install.sh - PATH_TYPE - 0 - - RESOURCES - - + POSTINSTALL_PATH + + PATH + @CMAKE_CURRENT_BINARY_DIR@/post_install.sh + PATH_TYPE + 0 + + PREINSTALL_PATH + + PATH + @CMAKE_CURRENT_BINARY_DIR@/pre_install.sh + PATH_TYPE + 0 + + RESOURCES + + PACKAGE_SETTINGS AUTHENTICATION 1 CONCLUSION_ACTION 0 + FOLLOW_SYMBOLIC_LINKS + IDENTIFIER @APPLICATION_REV_DOMAIN_INSTALLER@ + LOCATION + 0 NAME @APPLICATION_NAME_XML_ESCAPED@ OVERWRITE_PERMISSIONS + PAYLOAD_SIZE + -1 + REFERENCE_PATH + + RELOCATABLE + + USE_HFS+_COMPRESSION + VERSION @MIRALL_VERSION_FULL@ + TYPE + 0 UUID 7D7219B7-1897-48C3-8533-842BDEC46F71 @@ -532,6 +590,45 @@ ALIGNMENT 6 + APPAREANCES + + DARK_AQUA + + ALIGNMENT + 6 + BACKGROUND_PATH + + PATH + @MAC_INSTALLER_BACKGROUND_FILE@ + PATH_TYPE + 0 + + CUSTOM + + LAYOUT_DIRECTION + 0 + SCALING + 0 + + LIGHT_AQUA + + ALIGNMENT + 6 + BACKGROUND_PATH + + PATH + @MAC_INSTALLER_BACKGROUND_FILE@ + PATH_TYPE + 0 + + CUSTOM + + LAYOUT_DIRECTION + 0 + SCALING + 0 + + BACKGROUND_PATH PATH @@ -540,9 +637,13 @@ 0 CUSTOM - @MAC_INSTALLER_DO_CUSTOM_BACKGROUND@ + <@MAC_INSTALLER_DO_CUSTOM_BACKGROUND@/> + LAYOUT_DIRECTION + 0 SCALING 0 + SHARED_SETTINGS_FOR_ALL_APPAREANCES + INSTALLATION TYPE @@ -578,10 +679,8 @@ - INSTALLATION TYPE - 1 - MODE - 1 + MODE + 1 INSTALLATION_STEPS @@ -649,8 +748,6 @@ LICENSE - KEYWORDS - LOCALIZATIONS MODE @@ -683,10 +780,6 @@ LIST - POSTINSTALL_PATH - - PREINSTALL_PATH - RESOURCES ROOT_VOLUME_ONLY @@ -694,14 +787,17 @@ PROJECT_SETTINGS - ADVANCED_OPTIONS - + ADVANCED_OPTIONS + + installer-script.domains:enable_localSystem + 1 + BUILD_FORMAT 0 BUILD_PATH PATH - @CMAKE_INSTALL_PREFIX@/. + @CMAKE_INSTALL_PREFIX@/. PATH_TYPE 3 @@ -875,8 +971,12 @@ NAME @APPLICATION_NAME_XML_ESCAPED@ Installer + PAYLOAD_ONLY + REFERENCE_FOLDER_PATH - @CMAKE_INSTALL_DIR@ + + TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING + TYPE diff --git a/admin/osx/post_install.sh.cmake b/admin/osx/post_install.sh.cmake index 55d5e1c1d0..dbc14eb534 100644 --- a/admin/osx/post_install.sh.cmake +++ b/admin/osx/post_install.sh.cmake @@ -1,7 +1,9 @@ -#!/bin/sh +#!/bin/bash + +LOGGED_IN_USER_ID=$(id -u "${USER}") # Always enable the new 10.10 finder plugin if available -if [ -x "$(command -v pluginkit)" ]; then +if [[ -x "$(command -v pluginkit)" ]]; then # add it to DB. This happens automatically too but we try to push it a bit harder for issue #3463 pluginkit -a "/Applications/@APPLICATION_EXECUTABLE@.app/Contents/PlugIns/FinderSyncExt.appex/" # Since El Capitan we need to sleep #4650 @@ -10,4 +12,10 @@ if [ -x "$(command -v pluginkit)" ]; then pluginkit -e use -i @APPLICATION_REV_DOMAIN@.FinderSyncExt fi +if [[ -f "${INSTALLER_TEMP}/OC_RESTART_NEEDED" ]]; then + if [[ "${COMMAND_LINE_INSTALL}" = "" ]]; then + /bin/launchctl asuser "${LOGGED_IN_USER_ID}" /usr/bin/open -g "/Applications/@APPLICATION_EXECUTABLE@.app" + fi +fi + exit 0 diff --git a/admin/osx/pre_install.sh.cmake b/admin/osx/pre_install.sh.cmake index cd909e29ad..51809adc4c 100644 --- a/admin/osx/pre_install.sh.cmake +++ b/admin/osx/pre_install.sh.cmake @@ -1,6 +1,10 @@ -#!/bin/sh +#!/bin/bash -# kill the old version. see issue #2044 -killall @APPLICATION_EXECUTABLE@ +OC_INSTANCE=$(ps aux | grep "/Applications/@APPLICATION_EXECUTABLE@.app/Contents/MacOS/@APPLICATION_EXECUTABLE@") + +if [[ "${OC_INSTANCE}" != "" ]]; then + kill $(echo ${OC_INSTANCE} | awk '{print $2}') + touch $INSTALLER_TEMP/OC_RESTART_NEEDED +fi exit 0 diff --git a/changelog/unreleased/3922 b/changelog/unreleased/3922 new file mode 100644 index 0000000000..d42a244f7e --- /dev/null +++ b/changelog/unreleased/3922 @@ -0,0 +1,5 @@ +Change: Restart the client after an update + +We now start the client after an update, if the client was running before the update. + +https://github.com/owncloud/enterprise/issues/3922 diff --git a/changelog/unreleased/7018 b/changelog/unreleased/7018 index a68bc84229..837a008ef1 100644 --- a/changelog/unreleased/7018 +++ b/changelog/unreleased/7018 @@ -1,5 +1,5 @@ Bugfix: Client sometimes does not show up when started by a user -We fixed a bug where a client somtimes does not show up when a user request a start. +We fixed a bug where a client sometimes does not show up when a user request a start. https://github.com/owncloud/client/issues/7018 diff --git a/changelog/unreleased/7043 b/changelog/unreleased/7043 index 8105bc2fe6..f16de84a34 100644 --- a/changelog/unreleased/7043 +++ b/changelog/unreleased/7043 @@ -1,6 +1,6 @@ -Bugfix: Fix serveral wrong colored icons in dark mode +Bugfix: Fix several wrong colored icons in dark mode -We fixed multiple issues where monocrome icons where not converted to match the +We fixed multiple issues where monochrome icons where not converted to match the current theme. https://github.com/owncloud/client/issues/7043 diff --git a/changelog/unreleased/7247 b/changelog/unreleased/7247 index 6b6c1a84df..8bc65aab6a 100644 --- a/changelog/unreleased/7247 +++ b/changelog/unreleased/7247 @@ -1,5 +1,5 @@ Bugfix: Fixed bug in public link with password required -In the sharing dialog, "password required" capabilities lead to incorrect behavior +In the sharing dialog, "password required" capabilities lead to incorrect behaviour https://github.com/owncloud/client/issues/7247 diff --git a/changelog/unreleased/7774 b/changelog/unreleased/7774 index e69e81b037..041cf3772e 100644 --- a/changelog/unreleased/7774 +++ b/changelog/unreleased/7774 @@ -1,4 +1,4 @@ -Bugfix: On Windows the share dialog somtimes does not open as the top most window +Bugfix: On Windows the share dialog does not open as the top most window We now ensure that the our dialogs are correctly raised. diff --git a/changelog/unreleased/7799 b/changelog/unreleased/7799 index 592ecbd8e6..545c15d5d1 100644 --- a/changelog/unreleased/7799 +++ b/changelog/unreleased/7799 @@ -1,5 +1,5 @@ Bugfix: Client sometimes crashes when a placeholder file was moved -We fixed an issue where moving a plcaeholder file would lead to a crash. +We fixed an issue where moving a placeholder file would lead to a crash. https://github.com/owncloud/client/issues/7799 diff --git a/changelog/unreleased/7831 b/changelog/unreleased/7831 new file mode 100644 index 0000000000..56a11bd292 --- /dev/null +++ b/changelog/unreleased/7831 @@ -0,0 +1,6 @@ +Bugfix: Don't override cookies with old values + +We fixed a bug where a client somteimes overrode the content of the cookie jar +with outdated or corrupted values + +https://github.com/owncloud/client/pull/7831 diff --git a/src/libsync/accessmanager.cpp b/src/libsync/accessmanager.cpp index 3e6435fdaf..e062d76f72 100644 --- a/src/libsync/accessmanager.cpp +++ b/src/libsync/accessmanager.cpp @@ -49,18 +49,6 @@ AccessManager::AccessManager(QObject *parent) setCookieJar(new CookieJar); } -void AccessManager::setRawCookie(const QByteArray &rawCookie, const QUrl &url) -{ - QNetworkCookie cookie(rawCookie.left(rawCookie.indexOf('=')), - rawCookie.mid(rawCookie.indexOf('=') + 1)); - qCDebug(lcAccessManager) << cookie.name() << cookie.value(); - QList cookieList; - cookieList.append(cookie); - - QNetworkCookieJar *jar = cookieJar(); - jar->setCookiesFromUrl(cookieList, url); -} - static QByteArray generateRequestId() { // Use a UUID with the starting and ending curly brace removed. @@ -71,12 +59,6 @@ static QByteArray generateRequestId() QNetworkReply *AccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData) { QNetworkRequest newRequest(request); - - if (newRequest.hasRawHeader("cookie")) { - // This will set the cookie into the QNetworkCookieJar which will then override the cookie header - setRawCookie(request.rawHeader("cookie"), request.url()); - } - newRequest.setRawHeader(QByteArray("User-Agent"), Utility::userAgentString()); // Some firewalls reject requests that have a "User-Agent" but no "Accept" header diff --git a/src/libsync/accessmanager.h b/src/libsync/accessmanager.h index b86e497f93..a2bd2ad45a 100644 --- a/src/libsync/accessmanager.h +++ b/src/libsync/accessmanager.h @@ -34,8 +34,6 @@ class OWNCLOUDSYNC_EXPORT AccessManager : public QNetworkAccessManager public: AccessManager(QObject *parent = nullptr); - void setRawCookie(const QByteArray &rawCookie, const QUrl &url); - protected: QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData = nullptr) override; }; diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp index 2585602c30..d1e877df17 100644 --- a/src/libsync/networkjobs.cpp +++ b/src/libsync/networkjobs.cpp @@ -878,8 +878,6 @@ void DetermineAuthTypeJob::start() req.setAttribute(HttpCredentials::DontAddCredentialsAttribute, true); // Don't reuse previous auth credentials req.setAttribute(QNetworkRequest::AuthenticationReuseAttribute, QNetworkRequest::Manual); - // Don't send cookies, we can't determine the auth type if we're logged in - req.setAttribute(QNetworkRequest::CookieLoadControlAttribute, QNetworkRequest::Manual); auto propfind = _account->sendRequest("PROPFIND", _account->davUrl(), req); propfind->setTimeout(30 * 1000); diff --git a/test/testsyncmove.cpp b/test/testsyncmove.cpp index 9476434fb8..b97d38e411 100644 --- a/test/testsyncmove.cpp +++ b/test/testsyncmove.cpp @@ -889,6 +889,9 @@ private slots: const QString src = "folder/folderA/file.txt"; const QString dest = "folder/folderB/file.txt"; FakeFolder fakeFolder{ FileInfo{ QString(), { FileInfo{ QStringLiteral("folder"), { FileInfo{ QStringLiteral("folderA"), { { QStringLiteral("file.txt"), 400 } } }, QStringLiteral("folderB") } } } } }; + auto syncOpts = fakeFolder.syncEngine().syncOptions(); + syncOpts._parallelNetworkJobs = 0; + fakeFolder.syncEngine().setSyncOptions(syncOpts); QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState());