From d80faa7339e4ff14aa764d6876bfec3205ca9b6d Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:37:29 +0100 Subject: [PATCH 1/5] Delete sources/patches directory --- .../patches/app-disable-registration.patch | 13 ----- sources/patches/app-sso.patch | 57 ------------------- 2 files changed, 70 deletions(-) delete mode 100644 sources/patches/app-disable-registration.patch delete mode 100644 sources/patches/app-sso.patch diff --git a/sources/patches/app-disable-registration.patch b/sources/patches/app-disable-registration.patch deleted file mode 100644 index 303ebe6..0000000 --- a/sources/patches/app-disable-registration.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/config/settings.yml b/config/settings.yml -index 094209822..2e2a5147d 100644 ---- a/config/settings.yml -+++ b/config/settings.yml -@@ -9,7 +9,7 @@ defaults: &defaults - site_terms: '' - site_contact_username: '' - site_contact_email: '' -- registrations_mode: 'open' -+ registrations_mode: 'none' - profile_directory: true - closed_registrations_message: '' - open_deletion: true diff --git a/sources/patches/app-sso.patch b/sources/patches/app-sso.patch deleted file mode 100644 index 0ae6380..0000000 --- a/sources/patches/app-sso.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb -index 7c36bc6b8..3f691d102 100644 ---- a/app/controllers/application_controller.rb -+++ b/app/controllers/application_controller.rb -@@ -68,7 +68,7 @@ class ApplicationController < ActionController::Base - if ENV['OMNIAUTH_ONLY'] == 'true' && ENV['OIDC_ENABLED'] == 'true' - '/auth/auth/openid_connect/logout' - else -- new_user_session_path -+ "https://#{File.read('/etc/yunohost/current_host')}/yunohost/sso/?action=logout" - end - end - - def pack(data, pack_name, skin = 'default') -diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb -index 5232e6cfd..160348674 100644 ---- a/config/initializers/devise.rb -+++ b/config/initializers/devise.rb -@@ -180,7 +180,7 @@ Devise.setup do |config| - # given strategies, for example, `config.http_authenticatable = [:database]` will - # enable it only for database authentication. The supported strategies are: - # :database = Support basic authentication with authentication key + password -- config.http_authenticatable = [:pam, :database] -+ config.http_authenticatable = [:two_factor_ldap, :pam, :database] - - # If 401 status code should be returned for AJAX requests. True by default. - # config.http_authenticatable_on_xhr = true -diff --git a/lib/devise/two_factor_ldap_authenticatable.rb b/lib/devise/two_factor_ldap_authenticatable.rb -index 065aa2de8..0eb4be10c 100644 ---- a/lib/devise/two_factor_ldap_authenticatable.rb -+++ b/lib/devise/two_factor_ldap_authenticatable.rb -@@ -5,13 +5,13 @@ require 'devise/strategies/base' - - module Devise - module Strategies -- class TwoFactorLdapAuthenticatable < Base -+ class TwoFactorLdapAuthenticatable < Authenticatable - def valid? -- valid_params? && mapping.to.respond_to?(:authenticate_with_ldap) -+ (valid_for_params_auth? || valid_for_http_auth?) && mapping.to.respond_to?(:authenticate_with_ldap) - end - - def authenticate! -- resource = mapping.to.authenticate_with_ldap(params[scope]) -+ resource = mapping.to.authenticate_with_ldap(authentication_hash.merge(:password => password)) - - if resource && !resource.otp_required_for_login? - success!(resource) -@@ -23,7 +23,7 @@ module Devise - protected - - def valid_params? -- params[scope] && params[scope][:password].present? -+ super && params[scope][:password].present? - end - end - end From bbc70edee1c652395c605acf223817b2463b5ce4 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:38:07 +0100 Subject: [PATCH 2/5] Bump version to 2024.02.14~ynh2 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 3d0de40..4463dde 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Libre and federated social network, fork of Mastodon", "fr": "Réseau social libre et fédéré, scission de Mastodon" }, - "version": "2024.02.14~ynh1", + "version": "2024.02.14~ynh2", "url": "https://github.com/glitch-soc/mastodon", "upstream": { "license": "AGPL-3.0-or-later", From 995c53323ac4ebe90ba0e6bc8c98104ccc56e9ac Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 16 Feb 2024 09:38:10 +0000 Subject: [PATCH 3/5] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b7f7ce8..39e829f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in See more [on the documentation](https://glitch-soc.github.io/docs/). -**Shipped version:** 2024.02.14~ynh1 +**Shipped version:** 2024.02.14~ynh2 ## Disclaimers / important information ⚠️ Glitch-Soc is beta software, and under active development. Use at your own risk! diff --git a/README_fr.md b/README_fr.md index e726717..ecc3f7a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -43,7 +43,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Voir plus [sur la documentation](https://glitch-soc.github.io/docs/) (en anglais). -**Version incluse :** 2024.02.14~ynh1 +**Version incluse :** 2024.02.14~ynh2 ## Avertissements / informations importantes Glitch-Soc est en constant développement, fournis avec les dernières fonctionnalités (incluant les derniers bugs). From 0705b9eb8fe5ccdf4fe425ed3923b6c599c5cd85 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 17 Feb 2024 06:10:58 +0000 Subject: [PATCH 4/5] Upgrade to v2024.02.16 --- conf/app.src | 6 +++--- manifest.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/app.src b/conf/app.src index b9bdb9d..9bed168 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/glitch-soc/mastodon/archive/e7ca82762dbcbf3d304437a91778f377e6739980.tar.gz -SOURCE_SUM=04f3078c7c3cf7b24a3137550f467c8ed580355abf4ede061f1ae2c3079b3cae +SOURCE_URL=https://github.com/glitch-soc/mastodon/archive/c0279385d70202bb3ee2b7e277e558ec1245cc7a.tar.gz +SOURCE_SUM=18a1c5ac55c83e76b303d1af0894b03e20f684f7fff1b7dda12d889bc7a85a01 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=e7ca82762dbcbf3d304437a91778f377e6739980.tar.gz +SOURCE_FILENAME=c0279385d70202bb3ee2b7e277e558ec1245cc7a.tar.gz SOURCE_EXTRACT=true diff --git a/manifest.json b/manifest.json index 4463dde..b8a8d97 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Libre and federated social network, fork of Mastodon", "fr": "Réseau social libre et fédéré, scission de Mastodon" }, - "version": "2024.02.14~ynh2", + "version": "2024.02.16~ynh1", "url": "https://github.com/glitch-soc/mastodon", "upstream": { "license": "AGPL-3.0-or-later", From d3ec97bad68762b23c1731952f0f1fc7ef4909f8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 17 Feb 2024 06:11:08 +0000 Subject: [PATCH 5/5] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 39e829f..4e48a9e 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in See more [on the documentation](https://glitch-soc.github.io/docs/). -**Shipped version:** 2024.02.14~ynh2 +**Shipped version:** 2024.02.16~ynh1 ## Disclaimers / important information ⚠️ Glitch-Soc is beta software, and under active development. Use at your own risk! diff --git a/README_fr.md b/README_fr.md index ecc3f7a..5582cfe 100644 --- a/README_fr.md +++ b/README_fr.md @@ -43,7 +43,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Voir plus [sur la documentation](https://glitch-soc.github.io/docs/) (en anglais). -**Version incluse :** 2024.02.14~ynh2 +**Version incluse :** 2024.02.16~ynh1 ## Avertissements / informations importantes Glitch-Soc est en constant développement, fournis avec les dernières fonctionnalités (incluant les derniers bugs).