lato 3.25.0 → 3.26.0

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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +49 -20
  3. data/app/assets/javascripts/lato/controllers/lato_account_webauthn_controller.js +8 -5
  4. data/app/assets/javascripts/lato/controllers/lato_action_controller.js +26 -15
  5. data/app/assets/javascripts/lato/controllers/lato_confirm_controller.js +25 -15
  6. data/app/assets/javascripts/lato/controllers/lato_copyclip_controller.js +28 -10
  7. data/app/assets/javascripts/lato/controllers/lato_form_controller.js +1 -0
  8. data/app/assets/javascripts/lato/controllers/lato_index_controller.js +4 -1
  9. data/app/controllers/concerns/lato/componentable.rb +20 -8
  10. data/app/controllers/concerns/lato/sessionable.rb +39 -10
  11. data/app/controllers/lato/account_controller.rb +10 -8
  12. data/app/controllers/lato/application_controller.rb +25 -1
  13. data/app/controllers/lato/authentication_controller.rb +74 -39
  14. data/app/helpers/lato/components_helper.rb +42 -16
  15. data/app/jobs/lato/active_storage_cleaner_job.rb +8 -7
  16. data/app/models/lato/invitation.rb +1 -1
  17. data/app/models/lato/operation.rb +6 -2
  18. data/app/models/lato/user.rb +39 -9
  19. data/app/views/lato/account/_alert-accepted-privacy-policy-version.html.erb +1 -1
  20. data/app/views/lato/account/_alert-accepted-terms-and-conditions-version.html.erb +1 -1
  21. data/app/views/lato/account/_form-authenticator.html.erb +7 -3
  22. data/app/views/lato/account/_form-password.html.erb +3 -2
  23. data/app/views/lato/account/_form-web3.html.erb +4 -3
  24. data/app/views/lato/account/_security-confirmation.html.erb +3 -3
  25. data/app/views/lato/authentication/_fields-registration.html.erb +8 -7
  26. data/app/views/lato/authentication/_form-authenticator.html.erb +2 -2
  27. data/app/views/lato/authentication/_form-signin.html.erb +2 -2
  28. data/app/views/lato/authentication/_form-verify-email.html.erb +3 -2
  29. data/app/views/lato/authentication/_form-web3-signin.html.erb +4 -3
  30. data/app/views/lato/components/_index.html.erb +25 -20
  31. data/app/views/lato/components/_navbar_nav_item.html.erb +1 -1
  32. data/app/views/lato/components/_operation.html.erb +4 -1
  33. data/app/views/lato/components/_page_head.html.erb +1 -1
  34. data/app/views/lato/components/_sidebar_nav_item.html.erb +2 -1
  35. data/app/views/lato/mailer/invitation/invite_mail.html.erb +1 -1
  36. data/app/views/lato/mailer/user/email_verification_mail.html.erb +1 -1
  37. data/app/views/lato/mailer/user/password_update_mail.html.erb +1 -1
  38. data/app/views/lato/mailer/user/signin_success_mail.html.erb +1 -1
  39. data/app/views/layouts/lato/_action.html.erb +2 -2
  40. data/app/views/layouts/lato/_aside-opener.html.erb +2 -2
  41. data/app/views/layouts/lato/_confirm.html.erb +6 -8
  42. data/app/views/layouts/lato/_feedbacks.html.erb +9 -8
  43. data/app/views/layouts/lato/_mailer-head_content.html.erb +1 -1
  44. data/app/views/layouts/lato/_network.html.erb +3 -3
  45. data/app/views/layouts/lato/application.html.erb +3 -2
  46. data/config/locales/en.yml +32 -0
  47. data/config/locales/fr.yml +29 -0
  48. data/config/locales/it.yml +29 -0
  49. data/config/locales/ro.yml +29 -0
  50. data/db/migrate/20261110000000_add_second_factor_counters_to_lato_users.rb +6 -0
  51. data/lib/lato/config.rb +4 -0
  52. data/lib/lato/engine.rb +5 -0
  53. data/lib/lato/version.rb +1 -1
  54. metadata +22 -15
@@ -2,6 +2,29 @@
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
+ password_requirements: "Cel pu\u021Bin %{count} caractere."
11
+ too_many_requests: "Prea multe cereri, a\u0219tepta\u021Bi %{minutes} minute \u00EEnainte de a re\u00EEncerca."
12
+ hcaptcha_missing: "Completa\u021Bi verificarea captcha."
13
+ hcaptcha_failed: "Verificarea captcha a e\u0219uat, re\u00EEncerca\u021Bi."
14
+ security_confirmation_required: "Confirma\u021Bi parola curent\u0103 \u0219i al doilea factor activ pentru a continua."
15
+ current_password: "Parola curent\u0103"
16
+ current_authenticator_code: "Codul authenticator curent"
17
+ security_key_confirmation_help: "Confirma\u021Bi cu cheia de securitate \u00EEnregistrat\u0103 la trimitere."
18
+ confirm_authenticator_code: "Confirma\u021Bi codul authenticator"
19
+ authenticator_qr_code_alt: "Cod QR pentru configurarea authenticator"
20
+ authenticator_manual_key: "Sau introduce\u021Bi manual aceast\u0103 cheie \u00EEn aplica\u021Bia authenticator"
21
+ connecting: "Se conecteaz\u0103..."
22
+ back_to_account: "\u00CEnapoi la contul t\u0103u"
23
+ network_offline: "Sunte\u021Bi offline"
24
+ network_online: "Sunte\u021Bi online"
25
+ toggle_sidebar: "Afi\u0219eaz\u0103/ascunde bara lateral\u0103"
26
+ skip_to_content: "Salt la con\u021Binutul principal"
27
+ copied: "Copiat \u00EEn clipboard"
5
28
  account: Cont
6
29
  signout: Deconectare
7
30
  signin: Conectare
@@ -173,8 +196,14 @@ ro:
173
196
  inclusion: neacceptați
174
197
  web3_address:
175
198
  not_correct: incorect
199
+ lato/operation:
200
+ attributes:
201
+ base:
202
+ start_error: "Imposibil de pornit jobul"
176
203
  lato/invitation:
177
204
  attributes:
205
+ email:
206
+ taken: "deja folosit de alt utilizator"
178
207
  base:
179
208
  already_accepted: Invitația deja acceptată de utilizator
180
209
  email_sending_error: Imposibil să se trimită email-ul
@@ -0,0 +1,6 @@
1
+ class AddSecondFactorCountersToLatoUsers < ActiveRecord::Migration[7.1]
2
+ def change
3
+ add_column :lato_users, :authenticator_last_used_at, :datetime
4
+ add_column :lato_users, :webauthn_sign_count, :integer, null: false, default: 0
5
+ end
6
+ end
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
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.25.0"
2
+ VERSION = "3.26.0"
3
3
  end
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.25.0
4
+ version: 3.26.0
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: '0'
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: '0'
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