mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Revert "Adapt PHP custom patches to 14.0.4 code"
This reverts commit 846d2f3dc8
.
This commit is contained in:
parent
1b7992dae7
commit
9a9116b363
2 changed files with 37 additions and 85 deletions
|
@ -1,32 +1,6 @@
|
||||||
core/Controller/LoginController.php | 25 ++++++++++++++-----------
|
|
||||||
1 file changed, 14 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
|
|
||||||
index 182d2bc106..82523e306e 100644
|
|
||||||
--- a/core/Controller/LoginController.php
|
--- a/core/Controller/LoginController.php
|
||||||
+++ b/core/Controller/LoginController.php
|
+++ b/core/Controller/LoginController.php
|
||||||
@@ -95,13 +95,13 @@ class LoginController extends Controller {
|
@@ -119,7 +119,10 @@
|
||||||
* @param Throttler $throttler
|
|
||||||
*/
|
|
||||||
public function __construct($appName,
|
|
||||||
- IRequest $request,
|
|
||||||
- IUserManager $userManager,
|
|
||||||
- IConfig $config,
|
|
||||||
- ISession $session,
|
|
||||||
- IUserSession $userSession,
|
|
||||||
- IURLGenerator $urlGenerator,
|
|
||||||
- ILogger $logger,
|
|
||||||
+ IRequest $request,
|
|
||||||
+ IUserManager $userManager,
|
|
||||||
+ IConfig $config,
|
|
||||||
+ ISession $session,
|
|
||||||
+ IUserSession $userSession,
|
|
||||||
+ IURLGenerator $urlGenerator,
|
|
||||||
+ ILogger $logger,
|
|
||||||
Manager $twoFactorManager,
|
|
||||||
Defaults $defaults,
|
|
||||||
Throttler $throttler) {
|
|
||||||
@@ -130,7 +130,10 @@ class LoginController extends Controller {
|
|
||||||
}
|
}
|
||||||
$this->userSession->logout();
|
$this->userSession->logout();
|
||||||
|
|
||||||
|
@ -35,28 +9,6 @@ index 182d2bc106..82523e306e 100644
|
||||||
+ $this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')
|
+ $this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')
|
||||||
+ );
|
+ );
|
||||||
+ $response = new RedirectResponse($redirectUrl);
|
+ $response = new RedirectResponse($redirectUrl);
|
||||||
$response->addHeader('Clear-Site-Data', '"cache", "storage", "executionContexts"');
|
$response->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"');
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
@@ -303,10 +306,10 @@ class LoginController extends Controller {
|
|
||||||
$previousUser = $user;
|
|
||||||
$user = $users[0]->getUID();
|
|
||||||
if($user !== $previousUser) {
|
|
||||||
- $loginResult = $this->userManager->checkPassword($user, $password);
|
|
||||||
- }
|
|
||||||
+ $loginResult = $this->userManager->checkPassword($user, $password);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if ($loginResult === false) {
|
|
||||||
$this->logger->warning('Login failed: \''. $user .
|
|
||||||
@@ -314,7 +317,7 @@ class LoginController extends Controller {
|
|
||||||
['app' => 'core']);
|
|
||||||
return $this->createLoginFailedResponse($user, $originalUser,
|
|
||||||
$redirect_url, self::LOGIN_MSG_INVALIDPASSWORD);
|
|
||||||
- }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
// TODO: remove password checks from above and let the user session handle failures
|
|
||||||
// requires https://github.com/owncloud/core/pull/24616
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
|
diff --git a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
|
||||||
index 088fb2d859..15b05b75d1 100644
|
index 85ae127f5f..91618a09fc 100644
|
||||||
--- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
|
--- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
|
||||||
+++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
|
+++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
|
||||||
@@ -70,6 +70,10 @@ class ContentSecurityPolicyNonceManager {
|
@@ -65,6 +65,10 @@ class ContentSecurityPolicyNonceManager {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function browserSupportsCspV3(): bool {
|
public function browserSupportsCspV3() {
|
||||||
+ // YunoHost patch: disable CSPv3 nonces to:
|
+ // YunoHost patch: disable CSPv3 nonces to:
|
||||||
+ // - avoid white page on first login from YunoHost portal
|
+ // - avoid white page on first login from YunoHost portal
|
||||||
+ // - allow YunoHost tile display
|
+ // - allow YunoHost tile display
|
||||||
|
@ -18,10 +18,10 @@ index 088fb2d859..15b05b75d1 100644
|
||||||
Request::USER_AGENT_CHROME,
|
Request::USER_AGENT_CHROME,
|
||||||
// Firefox 45+
|
// Firefox 45+
|
||||||
diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
|
diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
|
||||||
index 6397d32cb9..32281a1734 100644
|
index 64d4eb6e5d..59d5885620 100644
|
||||||
--- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
|
--- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
|
||||||
+++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
|
+++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
|
||||||
@@ -406,7 +406,8 @@ class EmptyContentSecurityPolicy {
|
@@ -377,7 +377,8 @@ class EmptyContentSecurityPolicy {
|
||||||
|
|
||||||
if(!empty($this->allowedFontDomains)) {
|
if(!empty($this->allowedFontDomains)) {
|
||||||
$policy .= 'font-src ' . implode(' ', $this->allowedFontDomains);
|
$policy .= 'font-src ' . implode(' ', $this->allowedFontDomains);
|
||||||
|
|
Loading…
Add table
Reference in a new issue