lato 3.25.0 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +50 -20
- data/app/assets/javascripts/lato/controllers/lato_account_webauthn_controller.js +8 -5
- data/app/assets/javascripts/lato/controllers/lato_action_controller.js +26 -15
- data/app/assets/javascripts/lato/controllers/lato_confirm_controller.js +25 -15
- data/app/assets/javascripts/lato/controllers/lato_copyclip_controller.js +28 -10
- data/app/assets/javascripts/lato/controllers/lato_form_controller.js +1 -0
- data/app/assets/javascripts/lato/controllers/lato_index_controller.js +4 -1
- data/app/assets/stylesheets/lato/application.scss +17 -0
- data/app/controllers/concerns/lato/componentable.rb +20 -8
- data/app/controllers/concerns/lato/sessionable.rb +39 -10
- data/app/controllers/lato/account_controller.rb +10 -8
- data/app/controllers/lato/application_controller.rb +25 -1
- data/app/controllers/lato/authentication_controller.rb +74 -39
- data/app/helpers/lato/components_helper.rb +52 -17
- data/app/jobs/lato/active_storage_cleaner_job.rb +8 -7
- data/app/models/lato/invitation.rb +1 -1
- data/app/models/lato/operation.rb +6 -2
- data/app/models/lato/user.rb +39 -9
- data/app/views/lato/account/_alert-accepted-privacy-policy-version.html.erb +1 -1
- data/app/views/lato/account/_alert-accepted-terms-and-conditions-version.html.erb +1 -1
- data/app/views/lato/account/_form-authenticator.html.erb +7 -3
- data/app/views/lato/account/_form-password.html.erb +3 -2
- data/app/views/lato/account/_form-web3.html.erb +5 -4
- data/app/views/lato/account/_form-webauthn.html.erb +3 -3
- data/app/views/lato/account/_security-confirmation.html.erb +8 -5
- data/app/views/lato/account/index.html.erb +1 -1
- data/app/views/lato/authentication/_fields-registration.html.erb +8 -7
- data/app/views/lato/authentication/_form-authenticator.html.erb +2 -2
- data/app/views/lato/authentication/_form-signin.html.erb +2 -2
- data/app/views/lato/authentication/_form-verify-email.html.erb +3 -2
- data/app/views/lato/authentication/_form-web3-signin.html.erb +4 -3
- data/app/views/lato/components/_form_item_input_signature.html.erb +1 -1
- data/app/views/lato/components/_index.html.erb +27 -22
- data/app/views/lato/components/_navbar_nav_item.html.erb +1 -1
- data/app/views/lato/components/_operation.html.erb +6 -3
- data/app/views/lato/components/_page_head.html.erb +1 -1
- data/app/views/lato/components/_sidebar_nav_item.html.erb +2 -1
- data/app/views/lato/mailer/invitation/invite_mail.html.erb +1 -1
- data/app/views/lato/mailer/user/email_verification_mail.html.erb +1 -1
- data/app/views/lato/mailer/user/password_update_mail.html.erb +1 -1
- data/app/views/lato/mailer/user/signin_success_mail.html.erb +1 -1
- data/app/views/layouts/lato/_action.html.erb +2 -2
- data/app/views/layouts/lato/_aside-opener.html.erb +2 -2
- data/app/views/layouts/lato/_confirm.html.erb +6 -8
- data/app/views/layouts/lato/_feedbacks.html.erb +9 -8
- data/app/views/layouts/lato/_mailer-head_content.html.erb +1 -1
- data/app/views/layouts/lato/_network.html.erb +3 -3
- data/app/views/layouts/lato/application.html.erb +3 -2
- data/config/locales/en.yml +33 -0
- data/config/locales/fr.yml +30 -0
- data/config/locales/it.yml +30 -0
- data/config/locales/ro.yml +30 -0
- data/db/migrate/20261110000000_add_second_factor_counters_to_lato_users.rb +6 -0
- data/lib/lato/config.rb +4 -0
- data/lib/lato/engine.rb +5 -0
- data/lib/lato/version.rb +1 -1
- metadata +22 -15
data/config/locales/en.yml
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
en:
|
|
2
2
|
lato:
|
|
3
|
+
close: "Close"
|
|
4
|
+
notice_title: "Notification"
|
|
5
|
+
alert_title: "Error"
|
|
6
|
+
sort_ascending: "Sort by %{column} ascending"
|
|
7
|
+
sort_descending: "Sort by %{column} descending"
|
|
8
|
+
pagination_label: "Pagination: %{name}"
|
|
9
|
+
password_requirements: "At least %{count} characters."
|
|
10
|
+
too_many_requests: "Too many requests, please wait %{minutes} minutes to retry."
|
|
11
|
+
hcaptcha_missing: "Please complete the captcha verification."
|
|
12
|
+
hcaptcha_failed: "Captcha verification failed, please retry."
|
|
13
|
+
security_confirmation_required: "Confirm your current password and enabled second factor to continue."
|
|
14
|
+
current_password: "Current password"
|
|
15
|
+
current_authenticator_code: "Current authenticator code"
|
|
16
|
+
security_key_confirmation_help: "Confirm with your registered security key when submitting."
|
|
17
|
+
confirm_authenticator_code: "Confirm authenticator code"
|
|
18
|
+
authenticator_qr_code_alt: "Authenticator enrollment QR code"
|
|
19
|
+
authenticator_manual_key: "Or enter this key manually in your authenticator app"
|
|
20
|
+
connecting: "Connecting..."
|
|
21
|
+
back_to_account: "Back to your account"
|
|
22
|
+
network_offline: "You are offline"
|
|
23
|
+
network_online: "You are online"
|
|
24
|
+
toggle_sidebar: "Toggle sidebar"
|
|
25
|
+
skip_to_content: "Skip to main content"
|
|
26
|
+
copied: "Copied to clipboard"
|
|
3
27
|
account: Account
|
|
4
28
|
signout: Logout
|
|
5
29
|
signin: Login
|
|
@@ -144,6 +168,7 @@ en:
|
|
|
144
168
|
credentials_not_correct: Email or password not correct
|
|
145
169
|
privacy_policy_invalid: To accept the privacy policy you must select the confirmation checkbox
|
|
146
170
|
terms_and_conditions_invalid: To accept the terms and conditions you must select the confirmation checkbox
|
|
171
|
+
invitation_invalid: Invalid invitation
|
|
147
172
|
web3_address_invalid: The address you send is not corretly signed
|
|
148
173
|
web3_connection_error: Impossible to connect the wallet
|
|
149
174
|
authenticator_code_invalid: The code you inserted is not correct
|
|
@@ -153,6 +178,8 @@ en:
|
|
|
153
178
|
webauthn_authentication_failed: Passkey authentication failed. Please try again or use another method.
|
|
154
179
|
password:
|
|
155
180
|
not_correct: not correct
|
|
181
|
+
password_confirmation:
|
|
182
|
+
confirmation: does not match the password
|
|
156
183
|
email:
|
|
157
184
|
taken: already used with another account
|
|
158
185
|
not_registered: not registered
|
|
@@ -163,8 +190,14 @@ en:
|
|
|
163
190
|
inclusion: not accepted
|
|
164
191
|
web3_address:
|
|
165
192
|
not_correct: not correct
|
|
193
|
+
lato/operation:
|
|
194
|
+
attributes:
|
|
195
|
+
base:
|
|
196
|
+
start_error: "Unable to start the job"
|
|
166
197
|
lato/invitation:
|
|
167
198
|
attributes:
|
|
199
|
+
email:
|
|
200
|
+
taken: "already used by another user"
|
|
168
201
|
base:
|
|
169
202
|
already_accepted: Invitation already accepted
|
|
170
203
|
email_sending_error: Unable to send mail
|
data/config/locales/fr.yml
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
fr:
|
|
4
4
|
lato:
|
|
5
|
+
close: "Fermer"
|
|
6
|
+
notice_title: "Notification"
|
|
7
|
+
alert_title: "Erreur"
|
|
8
|
+
sort_ascending: "Trier par %{column} croissant"
|
|
9
|
+
sort_descending: "Trier par %{column} d\u00E9croissant"
|
|
10
|
+
pagination_label: "Pagination : %{name}"
|
|
11
|
+
password_requirements: "Au moins %{count} caract\u00E8res."
|
|
12
|
+
too_many_requests: "Trop de requ\u00EAtes, veuillez attendre %{minutes} minutes avant de r\u00E9essayer."
|
|
13
|
+
hcaptcha_missing: "Veuillez compl\u00E9ter la v\u00E9rification captcha."
|
|
14
|
+
hcaptcha_failed: "La v\u00E9rification captcha a \u00E9chou\u00E9, veuillez r\u00E9essayer."
|
|
15
|
+
security_confirmation_required: "Confirmez votre mot de passe actuel et le second facteur activ\u00E9 pour continuer."
|
|
16
|
+
current_password: "Mot de passe actuel"
|
|
17
|
+
current_authenticator_code: "Code authenticator actuel"
|
|
18
|
+
security_key_confirmation_help: "Confirmez avec votre cl\u00E9 de s\u00E9curit\u00E9 enregistr\u00E9e lors de l'envoi."
|
|
19
|
+
confirm_authenticator_code: "Confirmer le code authenticator"
|
|
20
|
+
authenticator_qr_code_alt: "QR code de configuration de l'authenticator"
|
|
21
|
+
authenticator_manual_key: "Ou saisissez cette cl\u00E9 manuellement dans votre application authenticator"
|
|
22
|
+
connecting: "Connexion en cours..."
|
|
23
|
+
back_to_account: "Retour \u00E0 votre compte"
|
|
24
|
+
network_offline: "Vous \u00EAtes hors ligne"
|
|
25
|
+
network_online: "Vous \u00EAtes en ligne"
|
|
26
|
+
toggle_sidebar: "Afficher/masquer la barre lat\u00E9rale"
|
|
27
|
+
skip_to_content: "Aller au contenu principal"
|
|
28
|
+
copied: "Copi\u00E9 dans le presse-papiers"
|
|
5
29
|
account: Compte
|
|
6
30
|
signout: Déconnexion
|
|
7
31
|
signin: Connexion
|
|
@@ -173,8 +197,14 @@ fr:
|
|
|
173
197
|
inclusion: non acceptées
|
|
174
198
|
web3_address:
|
|
175
199
|
not_correct: incorrect
|
|
200
|
+
lato/operation:
|
|
201
|
+
attributes:
|
|
202
|
+
base:
|
|
203
|
+
start_error: "Impossible de lancer le job"
|
|
176
204
|
lato/invitation:
|
|
177
205
|
attributes:
|
|
206
|
+
email:
|
|
207
|
+
taken: "d\u00E9j\u00E0 utilis\u00E9e par un autre utilisateur"
|
|
178
208
|
base:
|
|
179
209
|
already_accepted: Invitation déjà acceptée par l'utilisateur
|
|
180
210
|
email_sending_error: Impossible d'envoyer l'e-mail
|
data/config/locales/it.yml
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
it:
|
|
4
4
|
lato:
|
|
5
|
+
close: "Chiudi"
|
|
6
|
+
notice_title: "Notifica"
|
|
7
|
+
alert_title: "Errore"
|
|
8
|
+
sort_ascending: "Ordina per %{column} crescente"
|
|
9
|
+
sort_descending: "Ordina per %{column} decrescente"
|
|
10
|
+
pagination_label: "Paginazione: %{name}"
|
|
11
|
+
password_requirements: "Almeno %{count} caratteri."
|
|
12
|
+
too_many_requests: "Troppe richieste, attendi %{minutes} minuti prima di riprovare."
|
|
13
|
+
hcaptcha_missing: "Completa la verifica captcha."
|
|
14
|
+
hcaptcha_failed: "Verifica captcha non riuscita, riprova."
|
|
15
|
+
security_confirmation_required: "Conferma la password attuale e il secondo fattore attivo per continuare."
|
|
16
|
+
current_password: "Password attuale"
|
|
17
|
+
current_authenticator_code: "Codice authenticator attuale"
|
|
18
|
+
security_key_confirmation_help: "Conferma con la tua chiave di sicurezza registrata al momento dell'invio."
|
|
19
|
+
confirm_authenticator_code: "Conferma codice authenticator"
|
|
20
|
+
authenticator_qr_code_alt: "Codice QR per configurare l'authenticator"
|
|
21
|
+
authenticator_manual_key: "Oppure inserisci manualmente questa chiave nella tua app authenticator"
|
|
22
|
+
connecting: "Connessione in corso..."
|
|
23
|
+
back_to_account: "Torna al tuo account"
|
|
24
|
+
network_offline: "Sei offline"
|
|
25
|
+
network_online: "Sei online"
|
|
26
|
+
toggle_sidebar: "Mostra/nascondi barra laterale"
|
|
27
|
+
skip_to_content: "Vai al contenuto principale"
|
|
28
|
+
copied: "Copiato negli appunti"
|
|
5
29
|
account: Account
|
|
6
30
|
signout: Esci
|
|
7
31
|
signin: Accedi
|
|
@@ -173,8 +197,14 @@ it:
|
|
|
173
197
|
inclusion: non accettati
|
|
174
198
|
web3_address:
|
|
175
199
|
not_correct: non corretto
|
|
200
|
+
lato/operation:
|
|
201
|
+
attributes:
|
|
202
|
+
base:
|
|
203
|
+
start_error: "Impossibile eseguire il job"
|
|
176
204
|
lato/invitation:
|
|
177
205
|
attributes:
|
|
206
|
+
email:
|
|
207
|
+
taken: "gi\u00E0 utilizzata da un altro utente"
|
|
178
208
|
base:
|
|
179
209
|
already_accepted: Invito già accettato dall'utente
|
|
180
210
|
email_sending_error: Impossibile inviare mail
|
data/config/locales/ro.yml
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
ro:
|
|
4
4
|
lato:
|
|
5
|
+
close: "\u00CEnchide"
|
|
6
|
+
notice_title: "Notificare"
|
|
7
|
+
alert_title: "Eroare"
|
|
8
|
+
sort_ascending: "Sorteaz\u0103 dup\u0103 %{column} cresc\u0103tor"
|
|
9
|
+
sort_descending: "Sorteaz\u0103 dup\u0103 %{column} descresc\u0103tor"
|
|
10
|
+
pagination_label: "Paginare: %{name}"
|
|
11
|
+
password_requirements: "Cel pu\u021Bin %{count} caractere."
|
|
12
|
+
too_many_requests: "Prea multe cereri, a\u0219tepta\u021Bi %{minutes} minute \u00EEnainte de a re\u00EEncerca."
|
|
13
|
+
hcaptcha_missing: "Completa\u021Bi verificarea captcha."
|
|
14
|
+
hcaptcha_failed: "Verificarea captcha a e\u0219uat, re\u00EEncerca\u021Bi."
|
|
15
|
+
security_confirmation_required: "Confirma\u021Bi parola curent\u0103 \u0219i al doilea factor activ pentru a continua."
|
|
16
|
+
current_password: "Parola curent\u0103"
|
|
17
|
+
current_authenticator_code: "Codul authenticator curent"
|
|
18
|
+
security_key_confirmation_help: "Confirma\u021Bi cu cheia de securitate \u00EEnregistrat\u0103 la trimitere."
|
|
19
|
+
confirm_authenticator_code: "Confirma\u021Bi codul authenticator"
|
|
20
|
+
authenticator_qr_code_alt: "Cod QR pentru configurarea authenticator"
|
|
21
|
+
authenticator_manual_key: "Sau introduce\u021Bi manual aceast\u0103 cheie \u00EEn aplica\u021Bia authenticator"
|
|
22
|
+
connecting: "Se conecteaz\u0103..."
|
|
23
|
+
back_to_account: "\u00CEnapoi la contul t\u0103u"
|
|
24
|
+
network_offline: "Sunte\u021Bi offline"
|
|
25
|
+
network_online: "Sunte\u021Bi online"
|
|
26
|
+
toggle_sidebar: "Afi\u0219eaz\u0103/ascunde bara lateral\u0103"
|
|
27
|
+
skip_to_content: "Salt la con\u021Binutul principal"
|
|
28
|
+
copied: "Copiat \u00EEn clipboard"
|
|
5
29
|
account: Cont
|
|
6
30
|
signout: Deconectare
|
|
7
31
|
signin: Conectare
|
|
@@ -173,8 +197,14 @@ ro:
|
|
|
173
197
|
inclusion: neacceptați
|
|
174
198
|
web3_address:
|
|
175
199
|
not_correct: incorect
|
|
200
|
+
lato/operation:
|
|
201
|
+
attributes:
|
|
202
|
+
base:
|
|
203
|
+
start_error: "Imposibil de pornit jobul"
|
|
176
204
|
lato/invitation:
|
|
177
205
|
attributes:
|
|
206
|
+
email:
|
|
207
|
+
taken: "deja folosit de alt utilizator"
|
|
178
208
|
base:
|
|
179
209
|
already_accepted: Invitația deja acceptată de utilizator
|
|
180
210
|
email_sending_error: Imposibil să se trimită email-ul
|
data/lib/lato/config.rb
CHANGED
|
@@ -15,6 +15,9 @@ module Lato
|
|
|
15
15
|
# Max password recovery emails sent per hour across all users (nil disables the cap)
|
|
16
16
|
attr_accessor :auth_recover_password_hourly_limit
|
|
17
17
|
|
|
18
|
+
# Minimum password length, checked whenever a password is set
|
|
19
|
+
attr_accessor :auth_password_min_length
|
|
20
|
+
|
|
18
21
|
# Hcaptcha configs
|
|
19
22
|
attr_accessor :hcaptcha_site_key, :hcaptcha_secret
|
|
20
23
|
|
|
@@ -53,6 +56,7 @@ module Lato
|
|
|
53
56
|
@auth_disable_webauthn = false
|
|
54
57
|
@auth_disable_signin_success_mail = false
|
|
55
58
|
@auth_recover_password_hourly_limit = 100
|
|
59
|
+
@auth_password_min_length = 8
|
|
56
60
|
|
|
57
61
|
@hcaptcha_site_key = nil
|
|
58
62
|
@hcaptcha_secret = nil
|
data/lib/lato/engine.rb
CHANGED
|
@@ -17,6 +17,11 @@ module Lato
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
config.after_initialize do
|
|
20
|
+
# Recovery codes, verification codes and rate limits live in Rails.cache: a null store silently disables them.
|
|
21
|
+
if Rails.env.production? && Rails.cache.is_a?(ActiveSupport::Cache::NullStore)
|
|
22
|
+
Rails.logger.warn("[Lato] Rails.cache is a NullStore: password recovery, email verification and rate limiting will not work. Configure a shared cache store (Redis, Solid Cache, Memcache).")
|
|
23
|
+
end
|
|
24
|
+
|
|
20
25
|
if Lato.config.webauthn_connection
|
|
21
26
|
WebAuthn.configure do |config|
|
|
22
27
|
config.allowed_origins = Lato.config.webauthn_origin.is_a?(Array) ? Lato.config.webauthn_origin : [Lato.config.webauthn_origin]
|
data/lib/lato/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lato
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.26.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gregorio Galante
|
|
@@ -47,30 +47,36 @@ dependencies:
|
|
|
47
47
|
name: bcrypt
|
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
|
49
49
|
requirements:
|
|
50
|
-
- - "
|
|
50
|
+
- - "~>"
|
|
51
51
|
- !ruby/object:Gem::Version
|
|
52
|
-
version: '
|
|
52
|
+
version: '3.1'
|
|
53
53
|
type: :runtime
|
|
54
54
|
prerelease: false
|
|
55
55
|
version_requirements: !ruby/object:Gem::Requirement
|
|
56
56
|
requirements:
|
|
57
|
-
- - "
|
|
57
|
+
- - "~>"
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
|
-
version: '
|
|
59
|
+
version: '3.1'
|
|
60
60
|
- !ruby/object:Gem::Dependency
|
|
61
61
|
name: bootstrap
|
|
62
62
|
requirement: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements:
|
|
64
64
|
- - ">="
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: '0'
|
|
66
|
+
version: '5.0'
|
|
67
|
+
- - "<"
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: '6'
|
|
67
70
|
type: :runtime
|
|
68
71
|
prerelease: false
|
|
69
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
70
73
|
requirements:
|
|
71
74
|
- - ">="
|
|
72
75
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '0'
|
|
76
|
+
version: '5.0'
|
|
77
|
+
- - "<"
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: '6'
|
|
74
80
|
- !ruby/object:Gem::Dependency
|
|
75
81
|
name: kaminari
|
|
76
82
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -131,30 +137,30 @@ dependencies:
|
|
|
131
137
|
name: rotp
|
|
132
138
|
requirement: !ruby/object:Gem::Requirement
|
|
133
139
|
requirements:
|
|
134
|
-
- - "
|
|
140
|
+
- - "~>"
|
|
135
141
|
- !ruby/object:Gem::Version
|
|
136
|
-
version: '0'
|
|
142
|
+
version: '6.0'
|
|
137
143
|
type: :runtime
|
|
138
144
|
prerelease: false
|
|
139
145
|
version_requirements: !ruby/object:Gem::Requirement
|
|
140
146
|
requirements:
|
|
141
|
-
- - "
|
|
147
|
+
- - "~>"
|
|
142
148
|
- !ruby/object:Gem::Version
|
|
143
|
-
version: '0'
|
|
149
|
+
version: '6.0'
|
|
144
150
|
- !ruby/object:Gem::Dependency
|
|
145
151
|
name: webauthn
|
|
146
152
|
requirement: !ruby/object:Gem::Requirement
|
|
147
153
|
requirements:
|
|
148
|
-
- - "
|
|
154
|
+
- - "~>"
|
|
149
155
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: '0'
|
|
156
|
+
version: '3.0'
|
|
151
157
|
type: :runtime
|
|
152
158
|
prerelease: false
|
|
153
159
|
version_requirements: !ruby/object:Gem::Requirement
|
|
154
160
|
requirements:
|
|
155
|
-
- - "
|
|
161
|
+
- - "~>"
|
|
156
162
|
- !ruby/object:Gem::Version
|
|
157
|
-
version: '0'
|
|
163
|
+
version: '3.0'
|
|
158
164
|
- !ruby/object:Gem::Dependency
|
|
159
165
|
name: eth
|
|
160
166
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -322,6 +328,7 @@ files:
|
|
|
322
328
|
- db/migrate/20251206170443_add_webauthn_id_to_user.rb
|
|
323
329
|
- db/migrate/20251218192614_add_logs_on_lato_operation.rb
|
|
324
330
|
- db/migrate/20261024000000_create_lato_session_records.rb
|
|
331
|
+
- db/migrate/20261110000000_add_second_factor_counters_to_lato_users.rb
|
|
325
332
|
- lib/lato.rb
|
|
326
333
|
- lib/lato/btstrap.rb
|
|
327
334
|
- lib/lato/config.rb
|