From 9a80dcf11e4f3ee4f4a751550afc6469e76b22d9 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 24 Jul 2019 10:29:50 +0200 Subject: Use a custom cookiejar to avoid error when the cookie is badly saved It happens sometimes on wallabag.it, the json inside the cookie is badly saved and the json isn't valid. It generates an exception and avoid people to use the api and import contents. To fix that, we use a dedicated `FileCookieJar`, which extends the default one from Guzzle to fix these issues. Also updated deps --- src/Wallabag/CoreBundle/Resources/config/services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Resources') diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 31986951..169b67e5 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -82,7 +82,7 @@ services: - ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]] wallabag_core.guzzle.cookie_jar: - class: GuzzleHttp\Cookie\FileCookieJar + class: Wallabag\CoreBundle\Helper\FileCookieJar arguments: ["%kernel.cache_dir%/cookiejar.json"] wallabag_core.content_proxy: -- cgit v1.2.3 From 51d7f62b316abfc14e770b3108edb0e3f48e38dd Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 24 Jul 2019 16:07:38 +0200 Subject: Add logger to FileCookieJar --- src/Wallabag/CoreBundle/Resources/config/services.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Resources') diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 169b67e5..3f3d4de7 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -83,7 +83,9 @@ services: wallabag_core.guzzle.cookie_jar: class: Wallabag\CoreBundle\Helper\FileCookieJar - arguments: ["%kernel.cache_dir%/cookiejar.json"] + arguments: + - "@logger" + - "%kernel.cache_dir%/cookiejar.json" wallabag_core.content_proxy: class: Wallabag\CoreBundle\Helper\ContentProxy -- cgit v1.2.3