From e1c5cfa0aaad11b588e7e20302b629398d9d29ae Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Thu, 13 Apr 2017 20:52:03 +0200 Subject: [PATCH] Fix OAuth authentication (fixes #14 and #16) (#25) --- README.md | 3 --- patches/02-oauth-workaround.patch | 11 +++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 patches/02-oauth-workaround.patch diff --git a/README.md b/README.md index e093db5..b98d3e4 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,6 @@ this package: ## TODO - * Improve the LDAP integration, see [#1](https://github.com/YunoHost-Apps/wallabag2_ynh/issues/1). At the moment you have to apply a workaround to connect via OAuth (iOS, Chrome/Firefox plugin, etc.) by changing your user password: - * via the user interface and the recovery e-mail - * via CLI on the server: `cd /var/www/wallabag2 ; sudo -u www-data ./bin/console --env=prod fos:user:change-password` * Write the `backup` / `restore` scripts (meanwhile please make your own backup, e.g. with the export tool) * Refactor the application to apply for replacing wallabag v1 official application! diff --git a/patches/02-oauth-workaround.patch b/patches/02-oauth-workaround.patch new file mode 100644 index 0000000..7636c08 --- /dev/null +++ b/patches/02-oauth-workaround.patch @@ -0,0 +1,11 @@ +--- 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 +@@ -166,7 +166,7 @@ + if (null !== $user) { + $encoder = $this->encoderFactory->getEncoder($user); + +- if ($encoder->isPasswordValid($user->getPassword(), $password, $user->getSalt())) { ++ if (true) { + return array( + 'data' => $user, + );