From 09479c02ca08276a8d7ddeda83cf6c525e0cf7da Mon Sep 17 00:00:00 2001 From: delthas Date: Mon, 31 Aug 2020 22:28:19 +0200 Subject: [PATCH 01/25] Make the minimum user password length configurable Previously, all passwords had to be at least 12 characters long. Some users use a slightly shorter password, so some instances could wish to reduce the password length limit to a slightly lesser value. This makes the minimum password length configurable in the .env file, with the MIN_PASSWORD_LENGTH variable, that defaults to 12 to keep the previous behaviour by default. --- app/Http/Controllers/Auth/RegisterController.php | 2 +- config/pixelfed.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 02dbee42a..0a30c0705 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -115,7 +115,7 @@ class RegisterController extends Controller 'name' => 'nullable|string|max:'.config('pixelfed.max_name_length'), 'username' => $usernameRules, 'email' => $emailRules, - 'password' => 'required|string|min:12|confirmed', + 'password' => 'required|string|min:'.config('pixelfed.min_password_length').'|confirmed', ]; return Validator::make($data, $rules); diff --git a/config/pixelfed.php b/config/pixelfed.php index 7504c9493..cf2935b3e 100644 --- a/config/pixelfed.php +++ b/config/pixelfed.php @@ -119,6 +119,16 @@ return [ */ 'max_name_length' => env('MAX_NAME_LENGTH', 30), + /* + |-------------------------------------------------------------------------- + | Password minimum length limit + |-------------------------------------------------------------------------- + | + | Change the minimum length limit for user passwords. + | + */ + 'min_password_length' => env('MIN_PASSWORD_LENGTH', 12), + /* |-------------------------------------------------------------------------- | Album size limit From 18b12584d760afc1e88e98eb1be09a40d8350da3 Mon Sep 17 00:00:00 2001 From: delthas Date: Mon, 31 Aug 2020 23:03:31 +0200 Subject: [PATCH 02/25] Display the applications tab in the user profile settings sidebar Uncomments the link to the working Applications page --- resources/views/settings/partial/sidebar.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/settings/partial/sidebar.blade.php b/resources/views/settings/partial/sidebar.blade.php index 21165e1e7..08f7ed304 100644 --- a/resources/views/settings/partial/sidebar.blade.php +++ b/resources/views/settings/partial/sidebar.blade.php @@ -52,9 +52,9 @@ - {{-- --}} + From 748a3be46d80a4d9e5ee3e2da6e5131852307d15 Mon Sep 17 00:00:00 2001 From: delthas Date: Mon, 31 Aug 2020 23:16:42 +0200 Subject: [PATCH 03/25] Add support for configurable OAuth tokens and refresh tokens lifetime Previously, the lifetime of tokens and refresh tokens was hardcoded at 15 and 30 days. Some instances administrators may wish to change these values. This makes these two values configurable with the two .env variables: OAUTH_TOKEN_DAYS and OAUTH_REFRESH_DAYS which are the lifetime in days for these two tokens and refresh tokens. --- app/Providers/AuthServiceProvider.php | 4 ++-- config/instance.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 8eb85150b..5c7fb7ff6 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -28,8 +28,8 @@ class AuthServiceProvider extends ServiceProvider if(config('pixelfed.oauth_enabled')) { Passport::routes(null, ['middleware' => ['twofactor', \Fruitcake\Cors\HandleCors::class]]); - Passport::tokensExpireIn(now()->addDays(15)); - Passport::refreshTokensExpireIn(now()->addDays(30)); + Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration'))); + Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration'))); Passport::enableImplicitGrant(); if(config('instance.oauth.pat.enabled')) { Passport::personalAccessClientId(config('instance.oauth.pat.id')); diff --git a/config/instance.php b/config/instance.php index e8047f3ec..489118f0e 100644 --- a/config/instance.php +++ b/config/instance.php @@ -55,6 +55,8 @@ return [ ], 'oauth' => [ + 'token_expiration' => env('OAUTH_TOKEN_DAYS', 15), + 'refresh_expiration' => env('OAUTH_REFRESH_DAYS', 30), 'pat' => [ 'enabled' => env('OAUTH_PAT_ENABLED', false), 'id' => env('OAUTH_PAT_ID'), From 5bc96a49e7f9d4ab5980661d085ea5115c53a2c3 Mon Sep 17 00:00:00 2001 From: Sven Fischer Date: Tue, 8 Sep 2020 20:34:54 +0200 Subject: [PATCH 04/25] docker: update composer to 1.10.12 --- contrib/docker/Dockerfile.apache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/docker/Dockerfile.apache b/contrib/docker/Dockerfile.apache index 16395baf1..894362480 100644 --- a/contrib/docker/Dockerfile.apache +++ b/contrib/docker/Dockerfile.apache @@ -4,7 +4,7 @@ FROM php:7.4-apache-buster COPY contrib/docker/php.production.ini "$PHP_INI_DIR/php.ini" # Install Composer -ENV COMPOSER_VERSION=1.10.9 \ +ENV COMPOSER_VERSION=1.10.13 \ COMPOSER_HOME=/var/www/.composer \ COMPOSER_MEMORY_LIMIT=-1 \ PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}" From ed7edb8604472dc782449212787a6d9ccf043a5c Mon Sep 17 00:00:00 2001 From: Strubbl <97055+Strubbl@users.noreply.github.com> Date: Sat, 24 Oct 2020 12:41:08 +0200 Subject: [PATCH 05/25] Update Dockerfile.apache --- contrib/docker/Dockerfile.apache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/docker/Dockerfile.apache b/contrib/docker/Dockerfile.apache index 894362480..098393621 100644 --- a/contrib/docker/Dockerfile.apache +++ b/contrib/docker/Dockerfile.apache @@ -4,7 +4,7 @@ FROM php:7.4-apache-buster COPY contrib/docker/php.production.ini "$PHP_INI_DIR/php.ini" # Install Composer -ENV COMPOSER_VERSION=1.10.13 \ +ENV COMPOSER_VERSION=1.10.16 \ COMPOSER_HOME=/var/www/.composer \ COMPOSER_MEMORY_LIMIT=-1 \ PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}" From 8c220b97ddec251f918af89deb1bff81af093ed8 Mon Sep 17 00:00:00 2001 From: Strubbl <97055+Strubbl@users.noreply.github.com> Date: Sun, 1 Nov 2020 21:05:39 +0100 Subject: [PATCH 06/25] Update Dockerfile.apache --- contrib/docker/Dockerfile.apache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/docker/Dockerfile.apache b/contrib/docker/Dockerfile.apache index 098393621..e9e58805a 100644 --- a/contrib/docker/Dockerfile.apache +++ b/contrib/docker/Dockerfile.apache @@ -4,7 +4,7 @@ FROM php:7.4-apache-buster COPY contrib/docker/php.production.ini "$PHP_INI_DIR/php.ini" # Install Composer -ENV COMPOSER_VERSION=1.10.16 \ +ENV COMPOSER_VERSION=1.10.11 \ COMPOSER_HOME=/var/www/.composer \ COMPOSER_MEMORY_LIMIT=-1 \ PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}" From 9740798fbdf36bf77e411a62c3f81cff7a5b9d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Yvis?= <31569002+yvisherve@users.noreply.github.com> Date: Wed, 18 Nov 2020 12:15:56 +0100 Subject: [PATCH 07/25] Update helpcenter.php - FR lang --- resources/lang/fr/helpcenter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lang/fr/helpcenter.php b/resources/lang/fr/helpcenter.php index 09aa05cf9..d446a636c 100644 --- a/resources/lang/fr/helpcenter.php +++ b/resources/lang/fr/helpcenter.php @@ -20,5 +20,6 @@ return [ 'blockingAccounts' => 'Blocage des comptes', 'safetyTips' => 'Conseils de sécurité', 'reportSomething' => 'Signaler quelque chose', - 'dataPolicy' => 'Politique en matière de données' + 'dataPolicy' => 'Politique en matière de données', + 'taggingPeople' => 'Mentionner des personnes' ]; From f61a55180516a2353ea2ad73ec597981f4cc858f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Yvis?= <31569002+yvisherve@users.noreply.github.com> Date: Wed, 18 Nov 2020 12:29:32 +0100 Subject: [PATCH 08/25] Update helpcenter.php --- resources/lang/fr/helpcenter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/fr/helpcenter.php b/resources/lang/fr/helpcenter.php index d446a636c..655ab5c06 100644 --- a/resources/lang/fr/helpcenter.php +++ b/resources/lang/fr/helpcenter.php @@ -21,5 +21,6 @@ return [ 'safetyTips' => 'Conseils de sécurité', 'reportSomething' => 'Signaler quelque chose', 'dataPolicy' => 'Politique en matière de données', + 'taggingPeople' => 'Mentionner des personnes' ]; From dfef49b0d9dc98e1dc8a357b5f1a60d7e03693b3 Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:18:33 +0100 Subject: [PATCH 09/25] Update auth.php --- resources/lang/gl/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/gl/auth.php b/resources/lang/gl/auth.php index 81c434d1a..48645867b 100644 --- a/resources/lang/gl/auth.php +++ b/resources/lang/gl/auth.php @@ -14,6 +14,6 @@ return [ */ 'failed' => 'As credenciais non constan nos nosos rexistros.', - 'throttle' => 'Demasiados intentos de conexión. Por favor, inténteo de novo en :seconds seconds.', + 'throttle' => 'Demasiados intentos de conexión. Por favor, inténtao de novo en :seconds segundos.', ]; From 92700525d58b1b73769c61bbf29a7d8e44244877 Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:19:57 +0100 Subject: [PATCH 10/25] Create exception.php --- resources/lang/gl/exception.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 resources/lang/gl/exception.php diff --git a/resources/lang/gl/exception.php b/resources/lang/gl/exception.php new file mode 100644 index 000000000..15321cec3 --- /dev/null +++ b/resources/lang/gl/exception.php @@ -0,0 +1,11 @@ + [ + 'invalid' => [ + 'album' => 'Debe conter unha soa foto ou vídeo ou varias fotos.', + ], + ], + +]; From bce93ba53dffbc79729729425cf7b6a60abd16ee Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:23:13 +0100 Subject: [PATCH 11/25] Create helpcenter.php --- resources/lang/gl/helpcenter.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 resources/lang/gl/helpcenter.php diff --git a/resources/lang/gl/helpcenter.php b/resources/lang/gl/helpcenter.php new file mode 100644 index 000000000..5cbe967e7 --- /dev/null +++ b/resources/lang/gl/helpcenter.php @@ -0,0 +1,28 @@ + 'Centro de Axuda', + 'whatsnew' => 'Novidades', + + 'gettingStarted' => 'Comezar', + 'sharingMedia' => 'Compartir Multimedia', + 'profile' => 'Perfil', + 'stories' => 'Historias', + 'hashtags' => 'Cancelos', + 'discover' => 'Descubrir', + 'directMessages' => 'Mensaxes Directas', + 'timelines' => 'Cronoloxías', + 'embed' => 'Incrustar', + + 'communityGuidelines' => 'Guías da comunidade', + 'whatIsTheFediverse' => 'Que é o fediverso?', + 'controllingVisibility' => 'Control da visibilidade', + 'blockingAccounts' => 'Bloqueo de contas', + 'safetyTips' => 'Seguridade', + 'reportSomething' => 'Denunicas', + 'dataPolicy' => 'Política de datos', + + 'taggingPeople' => 'Etiquetar persoas' + +]; From a5204431554e5291e301af20c1c20ae4c3f23ca9 Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:25:24 +0100 Subject: [PATCH 12/25] Update navmenu.php --- resources/lang/gl/navmenu.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/resources/lang/gl/navmenu.php b/resources/lang/gl/navmenu.php index 4461d0ec9..09651c193 100644 --- a/resources/lang/gl/navmenu.php +++ b/resources/lang/gl/navmenu.php @@ -1,13 +1,19 @@ 'Ver perfil', - 'myTimeline' => 'A miña liña temporal', - 'publicTimeline' => 'Liña temporal pública', - 'remoteFollow' => 'Seguimento remoto', - 'settings' => 'Axustes', - 'admin' => 'Admin', - 'logout' => 'Saír', - + 'search' => 'Buscar', + 'home' => 'Inicio', + 'local' => 'Local', + 'network' => 'Rede', + 'discover' => 'Descubrir', + 'viewMyProfile' => 'Ver perfil', + 'myProfile' => 'O meu perfil', + 'myTimeline' => 'Cronoloxía', + 'publicTimeline' => 'Cronoloxía pública', + 'remoteFollow' => 'Seguimento remoto', + 'settings' => 'Axustes', + 'admin' => 'Admin', + 'logout' => 'Desconectar', + 'directMessages' => 'Mensaxes directas', + 'composePost' => 'Publicar', ]; From 6a155b0d9226ad4db933d5fe9d453001a513c133 Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:27:25 +0100 Subject: [PATCH 13/25] Update notification.php --- resources/lang/gl/notification.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/lang/gl/notification.php b/resources/lang/gl/notification.php index 5a70d5648..d1951fa79 100644 --- a/resources/lang/gl/notification.php +++ b/resources/lang/gl/notification.php @@ -2,7 +2,11 @@ return [ - 'likedPhoto' => 'gustoulle a súa foto.', - 'startedFollowingYou' => 'comezou a seguila.', + 'likedPhoto' => 'gustoulle a túa publicación.', + 'likedComment' => 'gustoulle o teu comentario.', + 'startedFollowingYou' => 'comezou a seguirte.', + 'commented' => 'comentou na túa publicación.', + 'mentionedYou' => 'mencionoute.', + 'shared' => 'compartiu a túa publicación.', ]; From 5070816127ae0320739cd5b2ba6c013be0c077e4 Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:32:32 +0100 Subject: [PATCH 14/25] Update passwords.php --- resources/lang/gl/passwords.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lang/gl/passwords.php b/resources/lang/gl/passwords.php index 5df2d9051..f79013146 100644 --- a/resources/lang/gl/passwords.php +++ b/resources/lang/gl/passwords.php @@ -13,10 +13,10 @@ return [ | */ - 'password' => 'Os contrasinais deben ser ao menos de seis caracteres e concordar na confirmación.', - 'reset' => 'Restableceuse o seu contrasinal!', - 'sent' => 'Acabamos de enviarlle unha ligazón para restablecer o contrasinal!', - 'token' => 'Este testemuño de restablecemento de contrasinal non é válido.', - 'user' => 'Non atopamos unha usuaria con ese enderezo de correo.', + 'password' => 'Os contrasinais deben ter seis caracteres como mínimo e concordar na confirmación.', + 'reset' => 'Restableceuse o teu contrasinal!', + 'sent' => 'Se o email está na base de datos, recibirás unha ligazón para restablecer o contrasinal dentro duns minutos. Comproba o cartafol de spam se non recibes o email.', + 'token' => 'O testemuño de restablecemento do contrasinal non é válido.', + 'user' => 'Se o email está na base de datos, recibirás unha ligazón para restablecer o contrasinal dentro duns minutos. Comproba o cartafol de spam se non recibes o email.', ]; From 59ab7b33553ef04d111293e106665c10c57b8c2b Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:36:08 +0100 Subject: [PATCH 15/25] Update profile.php --- resources/lang/gl/profile.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/resources/lang/gl/profile.php b/resources/lang/gl/profile.php index 2b39d9e62..c6ebeb49b 100644 --- a/resources/lang/gl/profile.php +++ b/resources/lang/gl/profile.php @@ -1,8 +1,15 @@ 'Esta usuaria aínda non publicou!', - 'emptyFollowers' => 'Esta usuaria aínda non ten seguidoras!', - 'emptyFollowing' => 'Esta usuaria aínda non segue a ninguén!', - 'savedWarning' => 'Só vostede pode ver o que gardou', + 'emptyTimeline' => 'Esta usuaria aínda non publicou!', + 'emptyFollowers' => 'Esta usuaria aínda non ten seguidoras!', + 'emptyFollowing' => 'Esta usuaria aínda non segue a ninguén!', + 'emptySaved' => 'Aínda non gardaches ningunha publicación!', + 'savedWarning' => 'Só podes ver o que gardaches', + 'privateProfileWarning' => 'Esta conta é Privada', + 'alreadyFollow' => 'Xa segues :username?', + 'loginToSeeProfile' => 'para ver as súas fotos e vídeos.', + + 'status.disabled.header' => 'Perfil non dispoñible', + 'status.disabled.body' => 'O perfil non está dipoñible neste intre, inténtao dentro dun anaco.', ]; From 26fc787f56d54a8aab3a1fe1f2a3ebbc9829780f Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:38:32 +0100 Subject: [PATCH 16/25] Update site.php --- resources/lang/gl/site.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/resources/lang/gl/site.php b/resources/lang/gl/site.php index f50a8ef35..28503d03f 100644 --- a/resources/lang/gl/site.php +++ b/resources/lang/gl/site.php @@ -1,13 +1,20 @@ 'Acerca de', - 'help' => 'Axuda', - 'language' => 'Idioma', - 'fediverse' => 'Fediverso', - 'opensource' => 'Código aberto', - 'terms' => 'Termos', - 'privacy' => 'Intimidade', - 'l10nWip' => 'Estamos a traballar no soporte da localización do servizo', - 'currentLocale' => 'Locale actual', - 'selectLocale' => 'Escolla un dos idiomas admitidos', + + 'about' => 'Acerca de', + 'help' => 'Axuda', + 'language' => 'Idioma', + 'fediverse' => 'Fediverso', + 'opensource' => 'Código aberto', + 'terms' => 'Termos', + 'privacy' => 'Privacidade', + 'l10nWip' => 'Estamos a traballar no sistema de tradución', + 'currentLocale' => 'Idioma actual', + 'selectLocale' => 'Elixe un dos idiomas incluídos', + 'contact' => 'Contacto', + 'contact-us' => 'Contacta con nós', + 'places' => 'Lugares', + 'profiles' => 'Perfís', + ]; From 204b8f497321422c2b53cb77cc3b728e9792ddc3 Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:39:26 +0100 Subject: [PATCH 17/25] Update timeline.php --- resources/lang/gl/timeline.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/gl/timeline.php b/resources/lang/gl/timeline.php index 25f07194a..e66ccafd8 100644 --- a/resources/lang/gl/timeline.php +++ b/resources/lang/gl/timeline.php @@ -2,6 +2,6 @@ return [ - 'emptyPersonalTimeline' => 'A súa liña temporal está baldeira.', + 'emptyPersonalTimeline' => 'A cronoloxía está baleira.', ]; From 2e08ea8df864c6b1fc650c82d03f9bd1572c962f Mon Sep 17 00:00:00 2001 From: Xose M <704948+xmgz@users.noreply.github.com> Date: Sat, 21 Nov 2020 18:46:27 +0100 Subject: [PATCH 18/25] Update validation.php --- resources/lang/gl/validation.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/lang/gl/validation.php b/resources/lang/gl/validation.php index caa7d2453..f6cb2dbd5 100644 --- a/resources/lang/gl/validation.php +++ b/resources/lang/gl/validation.php @@ -16,10 +16,10 @@ return [ 'accepted' => 'O :attribute debe aceptarse.', 'active_url' => 'O :attribute non é un URL válido.', 'after' => 'A :attribute debe ser unha data posterior :date.', - 'after_or_equal' => 'A :attribute debe ser unha data posterior ou igual a must be a date after or equal to :date.', + 'after_or_equal' => 'A :attribute debe ser unha data posterior ou igual a :date.', 'alpha' => 'O :attribute só pode conter letras.', - 'alpha_dash' => 'O :attribute podería conter só letras, números e guións.', - 'alpha_num' => 'O :attribute podería conter só letras e números.', + 'alpha_dash' => 'O :attribute pode conter só letras, números e trazos.', + 'alpha_num' => 'O :attribute pode conter só letras e números.', 'array' => 'A :attribute debe ser unha cadea.', 'before' => 'A :attribute debe ser unha data anterior a :date.', 'before_or_equal' => 'A :attribute debe ser unha data anterior ou igual a :date.', @@ -30,15 +30,15 @@ return [ 'array' => 'O :attribute debe ter entre :min e :max elementos.', ], 'boolean' => 'O campo :attribute debe ser verdadeiro ou falso.', - 'confirmed' => 'O :attribute de confirmación non coincide.', + 'confirmed' => 'O :attribute de confirmación non concorda.', 'date' => 'A :attribute non é unha data válida.', 'date_format' => 'O :attribute non segue o formato :format.', 'different' => ' :attribute e :other deben ser diferentes.', 'digits' => ' :attribute deben ser :digits díxitos.', 'digits_between' => ' :attribute debe ter entre :min e :max díxitos.', - 'dimensions' => 'The :attribute ten unhas dimensións de imaxe non válidas.', + 'dimensions' => ' :attribute ten unhas dimensións de imaxe non válidas.', 'distinct' => 'O campo :attribute ten un valor duplo.', - 'email' => 'The :attribute debe ser un enderezo de correo válido.', + 'email' => ' :attribute debe ser un enderezo de correo válido.', 'exists' => 'O :attribute escollido non é válido.', 'file' => ' :attribute debe ser un ficheiro.', 'filled' => 'O campo :attribute debe ter un valor.', @@ -72,8 +72,8 @@ return [ 'required' => 'O campo :attribute é requerido.', 'required_if' => 'O campo :attribute é requerido cando :other é :value.', 'required_unless' => 'O campo :attribute é requerido a non ser que :other esté en :values.', - 'required_with' => 'O campo :attribute é requerido cando :values é presente.', - 'required_with_all' => 'O campo :attribute é requerido cando :values é presente.', + 'required_with' => 'O campo :attribute é requerido cando :values está presente.', + 'required_with_all' => 'O campo :attribute é requerido cando :values está presente.', 'required_without' => 'O campo :attribute é requerido cando :values non está presente.', 'required_without_all' => 'O campo :attribute é requerido cando non está presente :values.', 'same' => ' :attribute e :other deben coincidir.', From 7cfae612db780b09d3fb3f7c5f386554970d1bb1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 21 Nov 2020 20:24:36 -0700 Subject: [PATCH 19/25] Updated AuthServiceProvider, added support for configurable OAuth tokens and refresh tokens lifetime --- app/Providers/AuthServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 5c7fb7ff6..a3230fa0a 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -28,8 +28,8 @@ class AuthServiceProvider extends ServiceProvider if(config('pixelfed.oauth_enabled')) { Passport::routes(null, ['middleware' => ['twofactor', \Fruitcake\Cors\HandleCors::class]]); - Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration'))); - Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration'))); + Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 15))); + Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 30))); Passport::enableImplicitGrant(); if(config('instance.oauth.pat.enabled')) { Passport::personalAccessClientId(config('instance.oauth.pat.id')); From c226086939585f16c87540af1b59aa8bc819faee Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 21 Nov 2020 20:25:15 -0700 Subject: [PATCH 20/25] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f29719c43..10ede3da0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,8 @@ - Updated Profile component, make modals scrollable. ([d1c664fa](https://github.com/pixelfed/pixelfed/commit/d1c664fa)) - Updated PostComponent, fixes #2351. ([7a62a42a](https://github.com/pixelfed/pixelfed/commit/7a62a42a)) - Updated DirectMessageController, fix pgsql bug. ([f1c28e7d](https://github.com/pixelfed/pixelfed/commit/f1c28e7d)) +- Updated RegisterController, make the minimum user password length configurable. ([09479c02](https://github.com/pixelfed/pixelfed/commit/09479c02)) +- Updated AuthServiceProvider, added support for configurable OAuth tokens and refresh tokens lifetime. ([7cfae612](https://github.com/pixelfed/pixelfed/commit/7cfae612)) ## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9) ### Added @@ -153,6 +155,7 @@ - Updated StatusTransformer, fixes #[2113](https://github.com/pixelfed/pixelfed/issues/2113) ([eefa6e0d](https://github.com/pixelfed/pixelfed/commit/eefa6e0d)) - Updated InternalApiController, limit remote profile ui to remote profiles ([d918a68e](https://github.com/pixelfed/pixelfed/commit/d918a68e)) - Updated NotificationCard, fix pagination bug #[2019](https://github.com/pixelfed/pixelfed/issues/2019) ([32beaad5](https://github.com/pixelfed/pixelfed/commit/32beaad5)) +- ## [v0.10.8 (2020-01-29)](https://github.com/pixelfed/pixelfed/compare/v0.10.7...v0.10.8) ### Added From 1b41d66446cf22f84c8026064df049cfcad0a761 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 21 Nov 2020 20:47:13 -0700 Subject: [PATCH 21/25] Update EmailService, make case insensitive --- app/Services/EmailService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/EmailService.php b/app/Services/EmailService.php index 70117f529..8582c90d2 100644 --- a/app/Services/EmailService.php +++ b/app/Services/EmailService.php @@ -12,7 +12,7 @@ class EmailService { $parts = explode('@', $email); - return in_array(last($parts), self::bannedDomains()); + return in_array(strtolower(last($parts)), array_map('strtolower', self::bannedDomains())); } public static function bannedDomains() From c26c469ae7bb8d82b5f0d87d83dd53f1a47560e2 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 21 Nov 2020 20:47:50 -0700 Subject: [PATCH 22/25] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10ede3da0..e3037ab3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,6 +98,7 @@ - Updated DirectMessageController, fix pgsql bug. ([f1c28e7d](https://github.com/pixelfed/pixelfed/commit/f1c28e7d)) - Updated RegisterController, make the minimum user password length configurable. ([09479c02](https://github.com/pixelfed/pixelfed/commit/09479c02)) - Updated AuthServiceProvider, added support for configurable OAuth tokens and refresh tokens lifetime. ([7cfae612](https://github.com/pixelfed/pixelfed/commit/7cfae612)) +- Updated EmailService, make case insensitive. ([1b41d664](https://github.com/pixelfed/pixelfed/commit/1b41d664)) ## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9) ### Added From d8cdc2a9113c6cdab0c6ee28fca227881e203a0e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 21 Nov 2020 20:49:51 -0700 Subject: [PATCH 23/25] Update sudo view, fix phrasing --- resources/views/auth/sudo.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/auth/sudo.blade.php b/resources/views/auth/sudo.blade.php index 515fcba03..ccaf6cc39 100644 --- a/resources/views/auth/sudo.blade.php +++ b/resources/views/auth/sudo.blade.php @@ -26,7 +26,7 @@
- +
From 8e8e6cafecdf99bd10935cd85441119599e54f6c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 25 Nov 2020 10:10:16 -0700 Subject: [PATCH 24/25] Update AuthLogin listener --- app/Listeners/AuthLogin.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Listeners/AuthLogin.php b/app/Listeners/AuthLogin.php index 9d1ce4a9c..45bf9c81a 100644 --- a/app/Listeners/AuthLogin.php +++ b/app/Listeners/AuthLogin.php @@ -42,6 +42,13 @@ class AuthLogin protected function userProfile($user) { if (empty($user->profile)) { + if($user->created_at->lt(now()->subDays(1))) { + $p = Profile::withTrashed()->whereUserId($user->id)->first(); + if($p) { + $p->restore(); + return; + } + } DB::transaction(function() use($user) { $profile = Profile::firstOrCreate(['user_id' => $user->id]); if($profile->wasRecentlyCreated == true) { From ef184a2cb40ff46c25d22e0c11c5b684f6b4e498 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 25 Nov 2020 10:11:50 -0700 Subject: [PATCH 25/25] Update AuthLogin listener --- app/Listeners/AuthLogin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Listeners/AuthLogin.php b/app/Listeners/AuthLogin.php index 45bf9c81a..90806965b 100644 --- a/app/Listeners/AuthLogin.php +++ b/app/Listeners/AuthLogin.php @@ -42,7 +42,7 @@ class AuthLogin protected function userProfile($user) { if (empty($user->profile)) { - if($user->created_at->lt(now()->subDays(1))) { + if($user->created_at->lt(now()->subDays(1)) && empty($user->status)) { $p = Profile::withTrashed()->whereUserId($user->id)->first(); if($p) { $p->restore();