1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wallabag2_ynh.git synced 2024-10-01 13:35:06 +02:00

Update patches

This commit is contained in:
Salamandar 2024-06-11 11:56:55 +02:00
parent e7da51df85
commit 67ac61f97a
3 changed files with 69 additions and 30 deletions

View file

@ -1,5 +1,15 @@
From e8027b881cffa0ed75de2c809fd88cf3cee42a0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <felix@piedallu.me>
Date: Tue, 11 Jun 2024 11:50:36 +0200
Subject: [PATCH 1/4] Add ldap auth
---
app/config/security.yml | 11 +++++++++++
app/config/services.yml | 4 ++++
2 files changed, 15 insertions(+)
diff --git a/app/config/security.yml b/app/config/security.yml
index 02afc9ea..5a3f7a34 100644
index 9ab51621..675d8905 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -13,6 +13,14 @@ security:
@ -17,7 +27,7 @@ index 02afc9ea..5a3f7a34 100644
# the main part of the security, where you can set up firewalls
# for specific sections of your app
@@ -38,6 +46,9 @@ security:
@@ -39,6 +47,9 @@ security:
secured_area:
pattern: ^/
@ -28,10 +38,10 @@ index 02afc9ea..5a3f7a34 100644
provider: fos_userbundle
csrf_token_generator: security.csrf.token_manager
diff --git a/app/config/services.yml b/app/config/services.yml
index 7b85d846..f23961c5 100644
index 270e79d9..efdd34d5 100644
--- a/app/config/services.yml
+++ b/app/config/services.yml
@@ -43,6 +43,10 @@ services:
@@ -176,6 +176,10 @@ services:
tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
@ -43,4 +53,5 @@ index 7b85d846..f23961c5 100644
class: Symfony\Component\Cache\Adapter\FilesystemAdapter
public: false
--
2.17.1
2.45.1

View file

@ -1,21 +1,34 @@
From 1a9312652c4ecb7b84aed0328c294b105763f816 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <felix@piedallu.me>
Date: Tue, 11 Jun 2024 11:52:33 +0200
Subject: [PATCH 2/4] Configure a custom logout success handler for yunohost
ldap
---
app/config/security.yml | 2 +-
app/config/services.yml | 4 +++
.../Security/LogoutSuccessHandler.php | 27 +++++++++++++++++++
3 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php
diff --git a/app/config/security.yml b/app/config/security.yml
index 5a3f7a34..1720e741 100644
index 675d8905..876f4471 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -62,7 +62,7 @@ security:
@@ -63,7 +63,7 @@ security:
logout:
path: /logout
- target: /
+ success_handler: yunohost.logout_success_handler
access_control:
- { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY }
two_factor:
provider: fos_userbundle
diff --git a/app/config/services.yml b/app/config/services.yml
index f23961c5..f266e6d1 100644
index efdd34d5..584b63c6 100644
--- a/app/config/services.yml
+++ b/app/config/services.yml
@@ -43,6 +43,10 @@ services:
@@ -176,6 +176,10 @@ services:
tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
@ -60,4 +73,5 @@ index 00000000..b3268243
+ }
+}
--
2.17.1
2.45.1

View file

@ -1,11 +1,25 @@
--- a/vendor/friendsofsymfony/oauth-server-bundle/Storage/OAuthStorage.php 2016-02-22 13:57:55.000000000 +0000
+++ b/vendor/friendsofsymfony/oauth-server-bundle/Storage/OAuthStorage.php 2017-04-13 17:16:06.298501506 +0000
@@ -170,7 +170,7 @@
if (null !== $user) {
$encoder = $this->encoderFactory->getEncoder($user);
From 7dc04c8bc50149998aa03a31f31674535a98ada9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <felix@piedallu.me>
Date: Tue, 11 Jun 2024 11:54:25 +0200
Subject: [PATCH 4/4] OAuthStorage workaround
---
.../oauth-server-bundle/Storage/OAuthStorage.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vendor/friendsofsymfony/oauth-server-bundle/Storage/OAuthStorage.php b/vendor/friendsofsymfony/oauth-server-bundle/Storage/OAuthStorage.php
index 5ab6b7c9..7cb77913 100644
--- a/vendor/friendsofsymfony/oauth-server-bundle/Storage/OAuthStorage.php
+++ b/vendor/friendsofsymfony/oauth-server-bundle/Storage/OAuthStorage.php
@@ -158,7 +158,7 @@ class OAuthStorage implements IOAuth2RefreshTokens, IOAuth2GrantUser, IOAuth2Gra
}
$encoder = $this->encoderFactory->getEncoder($user);
- if ($encoder->isPasswordValid($user->getPassword(), $password, $user->getSalt())) {
+ if (true) {
return array(
return [
'data' => $user,
);
];
--
2.45.1