From 115de64e5bb9d7f9151ecf15e15a0d988563528e Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 4 Oct 2018 14:07:20 +0200 Subject: Jump to Symfony 3.4 Thanks to the BC compatibility, almost nothing have to be changed. All changes are related to new bundle version of: - SensioFrameworkExtraBundle - DoctrineFixturesBundle --- app/config/config.yml | 5 +++++ app/config/config_test.yml | 1 + app/config/security.yml | 3 +++ app/config/services.yml | 6 ------ app/config/services_test.yml | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 app/config/services_test.yml (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 0c2b6a1d..951cdf71 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -357,3 +357,8 @@ jms_serializer: # see: https://github.com/schmittjoh/JMSSerializerBundle/pull/494 datetime: default_format: "Y-m-d\\TH:i:sO" # ATOM + +# see https://github.com/symfony/symfony-standard/pull/1133 +sensio_framework_extra: + router: + annotations: false diff --git a/app/config/config_test.yml b/app/config/config_test.yml index fc067ff4..11e0feb7 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -1,6 +1,7 @@ imports: - { resource: config_dev.yml } - { resource: parameters_test.yml } + - { resource: services_test.yml } framework: test: ~ diff --git a/app/config/security.yml b/app/config/security.yml index 02afc9ea..98f43011 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -31,12 +31,15 @@ security: fos_oauth: true stateless: true anonymous: true + provider: fos_userbundle login_firewall: + logout_on_user_change: true pattern: ^/login$ anonymous: ~ secured_area: + logout_on_user_change: true pattern: ^/ form_login: provider: fos_userbundle diff --git a/app/config/services.yml b/app/config/services.yml index 7b85d846..25bbe5dc 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -2,12 +2,6 @@ parameters: lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber services: - # used for tests - filesystem_cache: - class: Doctrine\Common\Cache\FilesystemCache - arguments: - - "%kernel.cache_dir%/doctrine/metadata" - twig.extension.text: class: Twig_Extensions_Extension_Text tags: diff --git a/app/config/services_test.yml b/app/config/services_test.yml new file mode 100644 index 00000000..a300f75d --- /dev/null +++ b/app/config/services_test.yml @@ -0,0 +1,38 @@ +services: + # see https://github.com/symfony/symfony/issues/24543 + fos_user.user_manager.test: + alias: fos_user.user_manager + public: true + + fos_user.security.login_manager.test: + alias: fos_user.security.login_manager + public: true + + wallabag_core.entry_repository.test: + alias: wallabag_core.entry_repository + public: true + + wallabag_user.user_repository.test: + alias: wallabag_user.user_repository + public: true + + filesystem_cache: + class: Doctrine\Common\Cache\FilesystemCache + arguments: + - "%kernel.cache_dir%/doctrine/metadata" + + # fixtures + Wallabag\AnnotationBundle\DataFixtures\ORM\: + resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/ORM/*' + tags: ['doctrine.fixture.orm'] + autowire: true + + Wallabag\CoreBundle\DataFixtures\ORM\: + resource: '../../src/Wallabag/CoreBundle/DataFixtures/ORM/*' + tags: ['doctrine.fixture.orm'] + autowire: true + + Wallabag\UserBundle\DataFixtures\ORM\: + resource: '../../src/Wallabag/UserBundle/DataFixtures/ORM/*' + tags: ['doctrine.fixture.orm'] + autowire: true -- cgit v1.2.3 From 6a3187066f2f60120acd11b207a40bbd6d6d9519 Mon Sep 17 00:00:00 2001 From: Glenn Goffin Date: Fri, 23 Feb 2018 20:39:25 +0100 Subject: Add secure email --- app/config/config.yml | 11 +++++++---- app/config/parameters.yml.dist | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 951cdf71..092f3ec0 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -79,10 +79,13 @@ doctrine_migrations: # Swiftmailer Configuration swiftmailer: - transport: "%mailer_transport%" - host: "%mailer_host%" - username: "%mailer_user%" - password: "%mailer_password%" + transport: "%mailer_transport%" + username: "%mailer_user%" + password: "%mailer_password%" + host: "%mailer_host%" + port: "%mailer_port%" + encryption: "%mailer_encryption%" + auth_mode: "%mailer_auth_mode%" spool: type: memory diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 6b0cb8e8..d21f20e0 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -27,10 +27,13 @@ parameters: domain_name: https://your-wallabag-url-instance.com - mailer_transport: smtp - mailer_host: 127.0.0.1 - mailer_user: ~ - mailer_password: ~ + mailer_transport: smtp + mailer_user: ~ + mailer_password: ~ + mailer_host: 127.0.0.1 + mailer_port: false + mailer_encryption: ~ + mailer_auth_mode: ~ locale: en -- cgit v1.2.3 From be417ef23685e17a239b1d192a0e9b9f484f1bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 12 Jun 2017 17:23:35 +0200 Subject: Added possibility to change locale from login/register pages --- app/config/security.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/config') diff --git a/app/config/security.yml b/app/config/security.yml index 98f43011..0318fce1 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -64,6 +64,7 @@ security: - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/locale, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/settings, roles: ROLE_SUPER_ADMIN } -- cgit v1.2.3 From db9b6d8d0d9f943fe321ea690701662dac828e94 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 26 Nov 2018 20:00:01 +0100 Subject: Update fixtures --- app/config/services_test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/config') diff --git a/app/config/services_test.yml b/app/config/services_test.yml index a300f75d..1b3aff63 100644 --- a/app/config/services_test.yml +++ b/app/config/services_test.yml @@ -22,17 +22,17 @@ services: - "%kernel.cache_dir%/doctrine/metadata" # fixtures - Wallabag\AnnotationBundle\DataFixtures\ORM\: - resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/ORM/*' + Wallabag\UserBundle\DataFixtures\: + resource: '../../src/Wallabag/UserBundle/DataFixtures/*' tags: ['doctrine.fixture.orm'] autowire: true - Wallabag\CoreBundle\DataFixtures\ORM\: - resource: '../../src/Wallabag/CoreBundle/DataFixtures/ORM/*' + Wallabag\CoreBundle\DataFixtures\: + resource: '../../src/Wallabag/CoreBundle/DataFixtures/*' tags: ['doctrine.fixture.orm'] autowire: true - Wallabag\UserBundle\DataFixtures\ORM\: - resource: '../../src/Wallabag/UserBundle/DataFixtures/ORM/*' + Wallabag\AnnotationBundle\DataFixtures\: + resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/*' tags: ['doctrine.fixture.orm'] autowire: true -- cgit v1.2.3 From 1b6b77f02956a767fb3fa9825a7b97b4879f7d42 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 26 Nov 2018 20:02:15 +0100 Subject: Remove custom Postgres class Because PG > 10 is now supported by DBAL >= 2.6.0 --- app/config/config.yml | 1 - app/config/config_test.yml | 1 - app/config/parameters.yml.dist | 2 -- app/config/parameters_test.yml | 1 - app/config/tests/parameters_test.mysql.yml | 1 - app/config/tests/parameters_test.pgsql.yml | 1 - app/config/tests/parameters_test.sqlite.yml | 1 - 7 files changed, 8 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 092f3ec0..ee0f0a38 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -46,7 +46,6 @@ twig: doctrine: dbal: driver: "%database_driver%" - driver_class: "%database_driver_class%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" diff --git a/app/config/config_test.yml b/app/config/config_test.yml index 11e0feb7..216f8431 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -24,7 +24,6 @@ swiftmailer: doctrine: dbal: driver: "%test_database_driver%" - driver_class: "%test_database_driver_class%" host: "%test_database_host%" port: "%test_database_port%" dbname: "%test_database_name%" diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index d21f20e0..13e2584f 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -11,8 +11,6 @@ parameters: # database_password: %env.database_password% database_driver: pdo_mysql - database_driver_class: ~ - # database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver database_host: 127.0.0.1 database_port: ~ database_name: wallabag diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 64e51976..257d2ace 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -8,4 +8,3 @@ parameters: test_database_path: "%env(TEST_DATABASE_PATH)%" env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" test_database_charset: utf8 - test_database_driver_class: ~ diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml index 0b7b82eb..36b227fb 100644 --- a/app/config/tests/parameters_test.mysql.yml +++ b/app/config/tests/parameters_test.mysql.yml @@ -1,6 +1,5 @@ parameters: test_database_driver: pdo_mysql - test_database_driver_class: ~ test_database_host: localhost test_database_port: 3306 test_database_name: wallabag_test diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml index ea249324..60f51df6 100644 --- a/app/config/tests/parameters_test.pgsql.yml +++ b/app/config/tests/parameters_test.pgsql.yml @@ -1,6 +1,5 @@ parameters: test_database_driver: pdo_pgsql - test_database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver test_database_host: localhost test_database_port: test_database_name: wallabag_test diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml index 64cd984b..2b92d579 100644 --- a/app/config/tests/parameters_test.sqlite.yml +++ b/app/config/tests/parameters_test.sqlite.yml @@ -1,6 +1,5 @@ parameters: test_database_driver: pdo_sqlite - test_database_driver_class: ~ test_database_host: localhost test_database_port: test_database_name: ~ -- cgit v1.2.3 From 3bd65991adc253715c6b74ab0ee19ff2cf3e6c69 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 15 Jan 2019 10:17:11 +0100 Subject: Add a new endpoint to retrieve information from the wallabag instance Useful for api client which required some information. We might add more inside them in the future. The endpoint /api/version should be avoided now as it contains not so much information rather the version. --- app/config/security.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/config') diff --git a/app/config/security.yml b/app/config/security.yml index 0318fce1..96489e26 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -57,9 +57,7 @@ security: target: / access_control: - - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: ^/api/user, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/api/(doc|version|info|user), roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } -- cgit v1.2.3 From 6113dbbc2037551ac11bab2c7cd1bb6f78676e0f Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 22 Jan 2019 20:38:28 +0100 Subject: Removed hardcoded database version --- app/config/config.yml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index ee0f0a38..4b34af30 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -54,7 +54,6 @@ doctrine: charset: "%database_charset%" path: "%database_path%" unix_socket: "%database_socket%" - server_version: 5.6 orm: auto_generate_proxy_classes: "%kernel.debug%" -- cgit v1.2.3 From a6b242a1fd6f8900d80354361449f1bf62506ef9 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 2 Dec 2018 12:43:05 +0100 Subject: Enable OTP 2FA - Update SchebTwoFactorBundle to version 3 - Enable Google 2fa on the bundle - Disallow ability to use both email and google as 2fa - Update Ocramius Proxy Manager to handle typed function & attributes (from PHP 7) - use `$this->addFlash` shortcut instead of `$this->get('session')->getFlashBag()->add` - update admin to be able to create/reset the 2fa --- app/config/config.yml | 8 ++++++-- app/config/routing.yml | 8 ++++++++ app/config/security.yml | 9 +++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 4b34af30..908f53b7 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -198,10 +198,14 @@ fos_oauth_server: refresh_token_lifetime: 1209600 scheb_two_factor: - trusted_computer: + trusted_device: enabled: true cookie_name: wllbg_trusted_computer - cookie_lifetime: 2592000 + lifetime: 2592000 + + google: + enabled: "%twofactor_auth%" + template: WallabagUserBundle:Authentication:form.html.twig email: enabled: "%twofactor_auth%" diff --git a/app/config/routing.yml b/app/config/routing.yml index 0bd2d130..a7c0f7e9 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -51,3 +51,11 @@ craue_config_settings_modify: fos_js_routing: resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" + +2fa_login: + path: /2fa + defaults: + _controller: "scheb_two_factor.form_controller:form" + +2fa_login_check: + path: /2fa_check diff --git a/app/config/security.yml b/app/config/security.yml index 96489e26..6a21b4e5 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -56,9 +56,17 @@ security: path: /logout target: / + two_factor: + provider: fos_userbundle + auth_form_path: 2fa_login + check_path: 2fa_login_check + access_control: - { path: ^/api/(doc|version|info|user), roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } + # force role for logout otherwise when 2fa enable, you won't be able to logout + # https://github.com/scheb/two-factor-bundle/issues/168#issuecomment-430822478 + - { path: ^/logout, roles: [IS_AUTHENTICATED_ANONYMOUSLY, IS_AUTHENTICATED_2FA_IN_PROGRESS] } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } @@ -67,5 +75,6 @@ security: - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/settings, roles: ROLE_SUPER_ADMIN } - { path: ^/annotations, roles: ROLE_USER } + - { path: ^/2fa, role: IS_AUTHENTICATED_2FA_IN_PROGRESS } - { path: ^/users, roles: ROLE_SUPER_ADMIN } - { path: ^/, roles: ROLE_USER } -- cgit v1.2.3 From dfd0a7bc5feb4fd7b77d7e2f3a25c5c3febc1eba Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 3 Dec 2018 06:51:06 +0100 Subject: Add backup codes --- app/config/config.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 908f53b7..2d8f9bf0 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -203,6 +203,9 @@ scheb_two_factor: cookie_name: wllbg_trusted_computer lifetime: 2592000 + backup_codes: + enabled: "%twofactor_auth%" + google: enabled: "%twofactor_auth%" template: WallabagUserBundle:Authentication:form.html.twig -- cgit v1.2.3 From 531c8d0a5c55fa93438e227a7d349235fbd31d28 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 13 Jun 2017 18:48:10 +0200 Subject: Changed RSS to Atom feed and improve paging --- app/config/security.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/config') diff --git a/app/config/security.yml b/app/config/security.yml index 6a21b4e5..760b2550 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -72,6 +72,8 @@ security: - { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/locale, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/feed, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } # For backwards compatibility - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/settings, roles: ROLE_SUPER_ADMIN } - { path: ^/annotations, roles: ROLE_USER } -- cgit v1.2.3 From 68a90821a305867e9b655da2dbfe558d37253990 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 26 Apr 2019 13:40:58 +0200 Subject: Handle redirection from previous feeds --- app/config/routing.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'app/config') diff --git a/app/config/routing.yml b/app/config/routing.yml index a7c0f7e9..d4defca0 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -59,3 +59,39 @@ fos_js_routing: 2fa_login_check: path: /2fa_check + +# redirect RSS feed to Atom +rss_to_atom_unread: + path: /{username}/{token}/unread.xml + defaults: + _controller: FrameworkBundle:Redirect:redirect + route: unread_feed + permanent: true + +rss_to_atom_archive: + path: /{username}/{token}/archive.xml + defaults: + _controller: FrameworkBundle:Redirect:redirect + route: archive_feed + permanent: true + +rss_to_atom_starred: + path: /{username}/{token}/starred.xml + defaults: + _controller: FrameworkBundle:Redirect:redirect + route: starred_feed + permanent: true + +rss_to_atom_all: + path: /{username}/{token}/all.xml + defaults: + _controller: FrameworkBundle:Redirect:redirect + route: all_feed + permanent: true + +rss_to_atom_tags: + path: /{username}/{token}/tags/{slug}.xml + defaults: + _controller: FrameworkBundle:Redirect:redirect + route: tag_feed + permanent: true -- cgit v1.2.3 From bf9ace0643f654e7ccd9c020b8b501ad56cd19de Mon Sep 17 00:00:00 2001 From: adev Date: Tue, 24 Oct 2017 22:55:40 +0200 Subject: Use httplug --- app/config/config.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 078f277a..309945c5 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -370,3 +370,22 @@ jms_serializer: sensio_framework_extra: router: annotations: false + +httplug: + clients: + wallabag_core: + factory: 'wallabag_core.http_client_factory' + plugins: ['httplug.plugin.logger'] + wallabag_core.entry.download_images: + factory: 'httplug.factory.auto' + plugins: ['httplug.plugin.logger'] + wallabag_import.pocket.client: + factory: 'httplug.factory.auto' + plugins: + - 'httplug.plugin.logger' + - header_defaults: + headers: + 'content-type': 'application/json' + 'X-Accept': 'application/json' + discovery: + client: false -- cgit v1.2.3 From 1048c9c4a811821b00cc04bfec905bebcc22bac4 Mon Sep 17 00:00:00 2001 From: adev Date: Sun, 12 Nov 2017 12:15:02 +0100 Subject: Configure timeout --- app/config/config.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/config') diff --git a/app/config/config.yml b/app/config/config.yml index 309945c5..bbcc682f 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -375,6 +375,9 @@ httplug: clients: wallabag_core: factory: 'wallabag_core.http_client_factory' + config: + defaults: + timeout: 10 plugins: ['httplug.plugin.logger'] wallabag_core.entry.download_images: factory: 'httplug.factory.auto' -- cgit v1.2.3