decidim-core 0.24.0.rc1 → 0.24.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/cells/decidim/activity/show.erb +1 -1
- data/app/cells/decidim/activity_cell.rb +6 -0
- data/app/cells/decidim/address/details.erb +5 -5
- data/app/cells/decidim/address_cell.rb +21 -0
- data/app/cells/decidim/content_blocks/hero_cell.rb +2 -2
- data/app/cells/decidim/content_blocks/last_activity_cell.rb +1 -1
- data/app/commands/decidim/destroy_account.rb +2 -0
- data/app/helpers/decidim/filters_helper.rb +2 -1
- data/app/views/decidim/searches/_filters_small_view.html.erb +1 -1
- data/config/locales/ca.yml +48 -10
- data/config/locales/cs.yml +2 -2
- data/config/locales/de.yml +5 -5
- data/config/locales/es-MX.yml +50 -0
- data/config/locales/es-PY.yml +50 -0
- data/config/locales/es.yml +53 -3
- data/config/locales/eu.yml +3 -3
- data/config/locales/fi-plain.yml +4 -4
- data/config/locales/fi.yml +8 -8
- data/config/locales/is-IS.yml +7 -0
- data/config/locales/it.yml +5 -5
- data/config/locales/pl.yml +3 -3
- data/config/locales/ru.yml +4 -6
- data/config/locales/sk.yml +1 -1
- data/config/locales/tr-TR.yml +2 -2
- data/config/locales/uk.yml +4 -6
- data/db/migrate/20201127114444_encrypt_authorization_metadatas.rb +1 -1
- data/db/migrate/20210302150803_invalidate_all_sessions_for_deleted_users.rb +11 -0
- data/lib/decidim/attribute_encryptor.rb +9 -1
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/record_encryptor.rb +20 -2
- metadata +7 -6
data/config/locales/is-IS.yml
CHANGED
@@ -291,6 +291,13 @@ is-IS:
|
|
291
291
|
pending: Í bið
|
292
292
|
rejected: Hafnað
|
293
293
|
verified: Staðfest
|
294
|
+
pages:
|
295
|
+
home:
|
296
|
+
statistics:
|
297
|
+
meetings_count: Fundir
|
298
|
+
projects_count: Verkefni
|
299
|
+
proposals_count: Tillögur
|
300
|
+
results_count: Niðurstöður
|
294
301
|
participatory_space_private_users:
|
295
302
|
not_allowed: Þú hefur ekki leyfi til að skoða þetta efni
|
296
303
|
profiles:
|
data/config/locales/it.yml
CHANGED
@@ -1069,14 +1069,14 @@ it:
|
|
1069
1069
|
headline: Statistiche su %{organization}
|
1070
1070
|
meetings_count: Incontri
|
1071
1071
|
orders_count: Voti
|
1072
|
-
pages_count:
|
1072
|
+
pages_count: pagine
|
1073
1073
|
processes_count: Processi
|
1074
|
-
projects_count:
|
1074
|
+
projects_count: Progetti
|
1075
1075
|
proposals_accepted: Proposte accettate
|
1076
|
-
proposals_count:
|
1077
|
-
results_count:
|
1076
|
+
proposals_count: Proposte
|
1077
|
+
results_count: Votazioni
|
1078
1078
|
surveys_count: Questionari
|
1079
|
-
users_count:
|
1079
|
+
users_count: I partecipanti
|
1080
1080
|
votes_count: Voti
|
1081
1081
|
sub_hero:
|
1082
1082
|
register: Registrati
|
data/config/locales/pl.yml
CHANGED
@@ -443,7 +443,7 @@ pl:
|
|
443
443
|
ready: Gotowy
|
444
444
|
show:
|
445
445
|
download_data: Pobierz dane
|
446
|
-
download_data_description: Plik zawierający wszystkie informacje związane z Twoim kontem zostanie wysłany do <strong>%{user_email}</strong>. E-mail będzie zawierał plik .zip i hasło, aby go otworzyć.<br/><br/>Aby rozpakować plik, będziesz potrzebował <a href="https://www.7-zip.org/">7-Zip</a> (Windows) lub <a href="https://www.keka.io/">Keka</a> (MacOS). Jeśli używasz systemu Linux, w większości przypadków program będziesz miał zainstalowany domyślnie. Jeśli nie, możesz użyć programów <a href="https://gitlab.gnome.org/GNOME/file-roller">File Roller</a> lub <a href="https://peazip.github.io">PeaZip</a
|
446
|
+
download_data_description: Plik zawierający wszystkie informacje związane z Twoim kontem zostanie wysłany do <strong>%{user_email}</strong>. E-mail będzie zawierał plik .zip i hasło, aby go otworzyć.<br/><br/>Aby rozpakować plik, będziesz potrzebował <a href="https://www.7-zip.org/">7-Zip</a> (Windows) lub <a href="https://www.keka.io/">Keka</a> (MacOS). Jeśli używasz systemu Linux, w większości przypadków program będziesz miał zainstalowany domyślnie. Jeśli nie, możesz użyć programów <a href="https://gitlab.gnome.org/GNOME/file-roller">File Roller</a> lub <a href="https://peazip.github.io">PeaZip</a>.
|
447
447
|
request_data: Poproś o dane
|
448
448
|
datepicker:
|
449
449
|
help_text: 'Oczekiwany format: %{datepicker_format}'
|
@@ -849,7 +849,7 @@ pl:
|
|
849
849
|
creator: Twórca
|
850
850
|
member: Członek
|
851
851
|
update:
|
852
|
-
error: Wystąpił
|
852
|
+
error: Wystąpił błąd podczas aktualizacji grupy
|
853
853
|
success: Grupa została zaktualizowana
|
854
854
|
help:
|
855
855
|
main_topic:
|
@@ -1061,7 +1061,7 @@ pl:
|
|
1061
1061
|
rejected: Odrzucone
|
1062
1062
|
verified: Zweryfikowano
|
1063
1063
|
pad_iframe:
|
1064
|
-
disclaimer: Zawartość tego pada napisana jest przez zarejestrowanych użytkowników i
|
1064
|
+
disclaimer: Zawartość tego pada napisana jest przez zarejestrowanych użytkowników i wyraża ich opinie. %{organization} nie może być pociągnięta do odpowiedzialności za jego zawartość.
|
1065
1065
|
explanation: Używaj tej podkładki do wspólnego robienia notatek podczas spotkania, więc łatwiej jest zapisać minutę później.
|
1066
1066
|
pad: Podkładka
|
1067
1067
|
pages:
|
data/config/locales/ru.yml
CHANGED
@@ -584,16 +584,14 @@ ru:
|
|
584
584
|
debates_count: Обсуждения
|
585
585
|
endorsements_count: Выражений поддержки
|
586
586
|
headline: Текущее состояние %{organization}
|
587
|
-
meetings_count:
|
587
|
+
meetings_count: Встречи
|
588
588
|
orders_count: Голосов
|
589
|
-
pages_count: Страниц
|
590
589
|
processes_count: Движений
|
591
|
-
projects_count:
|
590
|
+
projects_count: Проекты
|
592
591
|
proposals_accepted: Принятые предложения
|
593
|
-
proposals_count:
|
594
|
-
results_count:
|
592
|
+
proposals_count: Предложения
|
593
|
+
results_count: Итоги
|
595
594
|
surveys_count: Опросов
|
596
|
-
users_count: Участников
|
597
595
|
votes_count: Голосов
|
598
596
|
sub_hero:
|
599
597
|
register: Зарегистрироваться
|
data/config/locales/sk.yml
CHANGED
data/config/locales/tr-TR.yml
CHANGED
@@ -1066,7 +1066,7 @@ tr:
|
|
1066
1066
|
comments_count: Yorumlar
|
1067
1067
|
conferences_count: Konferanslar
|
1068
1068
|
debates_count: Tartışmalar
|
1069
|
-
endorsements_count:
|
1069
|
+
endorsements_count: Cirolar
|
1070
1070
|
headline: Mevcut durum %{organization}
|
1071
1071
|
meetings_count: Toplantılar
|
1072
1072
|
orders_count: Oylar
|
@@ -1074,7 +1074,7 @@ tr:
|
|
1074
1074
|
processes_count: Süreçler
|
1075
1075
|
projects_count: Projeler
|
1076
1076
|
proposals_accepted: Kabul Edilen Teklifler
|
1077
|
-
proposals_count:
|
1077
|
+
proposals_count: Teklif
|
1078
1078
|
results_count: Sonuçlar
|
1079
1079
|
surveys_count: Anketler
|
1080
1080
|
users_count: Katılımcılar
|
data/config/locales/uk.yml
CHANGED
@@ -455,16 +455,14 @@ uk:
|
|
455
455
|
debates_count: Обговорення
|
456
456
|
endorsements_count: Проявів підтримки
|
457
457
|
headline: Поточний стан %{organization}
|
458
|
-
meetings_count:
|
458
|
+
meetings_count: Зустрічі
|
459
459
|
orders_count: Голосів
|
460
|
-
pages_count: Сторінок
|
461
460
|
processes_count: Рухів
|
462
|
-
projects_count:
|
461
|
+
projects_count: Проекти
|
463
462
|
proposals_accepted: Прийняті пропозиції
|
464
|
-
proposals_count:
|
465
|
-
results_count:
|
463
|
+
proposals_count: Пропозиції
|
464
|
+
results_count: Підсумки
|
466
465
|
surveys_count: Опитувань
|
467
|
-
users_count: Учасників
|
468
466
|
votes_count: Голосів
|
469
467
|
sub_hero:
|
470
468
|
register: Зареєструватися
|
@@ -28,7 +28,7 @@ class EncryptAuthorizationMetadatas < ActiveRecord::Migration[5.2]
|
|
28
28
|
def decrypt_hash(hash)
|
29
29
|
hash.transform_values do |value|
|
30
30
|
ActiveSupport::JSON.decode(Decidim::AttributeEncryptor.decrypt(value))
|
31
|
-
rescue ActiveSupport::MessageEncryptor::InvalidMessage
|
31
|
+
rescue ActiveSupport::MessageEncryptor::InvalidMessage, ActiveSupport::MessageVerifier::InvalidSignature
|
32
32
|
value
|
33
33
|
end
|
34
34
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class InvalidateAllSessionsForDeletedUsers < ActiveRecord::Migration[5.2]
|
4
|
+
def up
|
5
|
+
Decidim::User.reset_column_information
|
6
|
+
|
7
|
+
Decidim::User.where.not(deleted_at: nil).find_each(&:invalidate_all_sessions!)
|
8
|
+
end
|
9
|
+
|
10
|
+
def down; end
|
11
|
+
end
|
@@ -7,7 +7,15 @@ module Decidim
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.decrypt(string_encrypted)
|
10
|
-
|
10
|
+
return if string_encrypted.blank?
|
11
|
+
|
12
|
+
# `ActiveSupport::MessageEncryptor` expects all values passed to the
|
13
|
+
# `#decrypt_and_verify` method to be instances of String as the message
|
14
|
+
# verifier calls `#split` on the value objects: https://git.io/JqfOO.
|
15
|
+
# If something else is passed, just return the value as is.
|
16
|
+
return string_encrypted unless string_encrypted.is_a?(String)
|
17
|
+
|
18
|
+
cryptor.decrypt_and_verify(string_encrypted)
|
11
19
|
end
|
12
20
|
|
13
21
|
def self.cryptor
|
data/lib/decidim/core/version.rb
CHANGED
@@ -103,7 +103,7 @@ module Decidim
|
|
103
103
|
|
104
104
|
def decrypt_value(value)
|
105
105
|
Decidim::AttributeEncryptor.decrypt(value)
|
106
|
-
rescue ActiveSupport::MessageEncryptor::InvalidMessage
|
106
|
+
rescue ActiveSupport::MessageEncryptor::InvalidMessage, ActiveSupport::MessageVerifier::InvalidSignature
|
107
107
|
# Support for legacy unencrypted values. This is necessary e.g. when
|
108
108
|
# migrating the original unencrypted values to encrypted values.
|
109
109
|
value
|
@@ -116,7 +116,25 @@ module Decidim
|
|
116
116
|
def decrypt_hash_values(hash)
|
117
117
|
return hash unless hash.is_a?(Hash)
|
118
118
|
|
119
|
-
hash.transform_values
|
119
|
+
hash.transform_values do |value|
|
120
|
+
# If the value is not a String, it is likely a legacy unencrypted hash
|
121
|
+
# value. Also, `ActiveSupport::JSON.decode` expects the value passed to
|
122
|
+
# it to be a String. Otherwise it would raise a TypeError.
|
123
|
+
next value unless value.is_a?(String)
|
124
|
+
|
125
|
+
decrypted_value = decrypt_value(value)
|
126
|
+
|
127
|
+
# When handling legacy unencrypted hash values, the decrypted values
|
128
|
+
# could not be valid JSON strings. They could be normal strings that
|
129
|
+
# cannot be JSON decoded.
|
130
|
+
begin
|
131
|
+
ActiveSupport::JSON.decode(decrypted_value)
|
132
|
+
rescue TypeError
|
133
|
+
""
|
134
|
+
rescue JSON::ParserError
|
135
|
+
decrypted_value
|
136
|
+
end
|
137
|
+
end
|
120
138
|
end
|
121
139
|
|
122
140
|
def encrypt_hash_values(hash)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.0.
|
4
|
+
version: 0.24.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-03-
|
13
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: active_link_to
|
@@ -858,28 +858,28 @@ dependencies:
|
|
858
858
|
requirements:
|
859
859
|
- - '='
|
860
860
|
- !ruby/object:Gem::Version
|
861
|
-
version: 0.24.0.
|
861
|
+
version: 0.24.0.rc2
|
862
862
|
type: :runtime
|
863
863
|
prerelease: false
|
864
864
|
version_requirements: !ruby/object:Gem::Requirement
|
865
865
|
requirements:
|
866
866
|
- - '='
|
867
867
|
- !ruby/object:Gem::Version
|
868
|
-
version: 0.24.0.
|
868
|
+
version: 0.24.0.rc2
|
869
869
|
- !ruby/object:Gem::Dependency
|
870
870
|
name: decidim-dev
|
871
871
|
requirement: !ruby/object:Gem::Requirement
|
872
872
|
requirements:
|
873
873
|
- - '='
|
874
874
|
- !ruby/object:Gem::Version
|
875
|
-
version: 0.24.0.
|
875
|
+
version: 0.24.0.rc2
|
876
876
|
type: :development
|
877
877
|
prerelease: false
|
878
878
|
version_requirements: !ruby/object:Gem::Requirement
|
879
879
|
requirements:
|
880
880
|
- - '='
|
881
881
|
- !ruby/object:Gem::Version
|
882
|
-
version: 0.24.0.
|
882
|
+
version: 0.24.0.rc2
|
883
883
|
description: Adds core features so other engines can hook into the framework.
|
884
884
|
email:
|
885
885
|
- josepjaume@gmail.com
|
@@ -2190,6 +2190,7 @@ files:
|
|
2190
2190
|
- db/migrate/20201218144706_update_table_block_user_functionality.rb
|
2191
2191
|
- db/migrate/20201218145252_rename_decidim_user_fields_for_block_functionality.rb
|
2192
2192
|
- db/migrate/20210208134328_add_email_on_moderations_to_users.rb
|
2193
|
+
- db/migrate/20210302150803_invalidate_all_sessions_for_deleted_users.rb
|
2193
2194
|
- db/seeds.rb
|
2194
2195
|
- db/seeds/homepage_image.jpg
|
2195
2196
|
- lib/decidim/action_authorization.rb
|