schleuder 3.3.0 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 637d9f0b81f2cb7aaee30a9761eeb0f09f49d95649a00d735ce13ecd008abdad
4
- data.tar.gz: ca41b305951ef8ac0fb7edfb42e87521cf1d2ce5e51be6ceaa3c57c933846067
3
+ metadata.gz: 3127723694c9320dbc25abc2bd7d5de2a0ca22d587c794bb36be5ae09fdf63f0
4
+ data.tar.gz: dfdcd502ca1498883cd931004034c7c4f8874271c06499bc39591cba407130a8
5
5
  SHA512:
6
- metadata.gz: 3b7f8cd46761314484df53f64ba3d929c75eccdfd4c7a2c7ce87d76720b6fa1025d59f370126b107b08a19b9916fe7e160563739a1058dc88a537acd744af212
7
- data.tar.gz: 149620dc7fc6549391af197396b68c8cf42b990e037d2224e337db57af00f90edb293e23120a8f2f8156e40cbfadcd35bca1009d066ba2126f98c4b7c90ae29a
6
+ metadata.gz: 31e3a5ed4c50043c7f0324f60595023cfc51766eca36aae32d326cffdcb81f09a3ad4798d4a96e43e99d67b768ab620dfe5b686ce95aeb5132f02e674cbc483a
7
+ data.tar.gz: bf93269f6737cfa57ce71474e15275e2379ea9c45cfc680698912d68674d0bd39a0d855ebbf09b59bdc00165948c81bc037b109012fd1b6b4a86f1664a9fcbb7
data/README.md CHANGED
@@ -47,15 +47,15 @@ Additionally these **rubygems** are required (will be installed automatically un
47
47
  Installing Schleuder
48
48
  ------------
49
49
 
50
- 1. Download [the gem](https://schleuder.org/download/schleuder-3.3.0.gem) and [the OpenPGP-signature](https://schleuder.org/download/schleuder-3.3.0.gem.sig) and verify:
50
+ 1. Download [the gem](https://schleuder.org/download/schleuder-3.4.1.gem) and [the OpenPGP-signature](https://schleuder.org/download/schleuder-3.4.1.gem.sig) and verify:
51
51
  ```
52
52
  gpg --recv-key 0xB3D190D5235C74E1907EACFE898F2C91E2E6E1F3
53
- gpg --verify schleuder-3.3.0.gem.sig
53
+ gpg --verify schleuder-3.4.1.gem.sig
54
54
  ```
55
55
 
56
56
  2. If all went well install the gem:
57
57
  ```
58
- gem install schleuder-3.3.0.gem
58
+ gem install schleuder-3.4.1.gem
59
59
  ```
60
60
 
61
61
  3. Set up schleuder:
@@ -145,4 +145,4 @@ GNU GPL 3.0. Please see [LICENSE.txt](LICENSE.txt).
145
145
  Alternative Download
146
146
  --------------------
147
147
 
148
- Alternatively to the gem-files you can download the latest release as [a tarball](https://schleuder.org/download/schleuder-3.3.0.tar.gz) and [its OpenPGP-signature](https://schleuder.org/download/schleuder-3.3.0.tar.gz.sig).
148
+ Alternatively to the gem-files you can download the latest release as [a tarball](https://schleuder.org/download/schleuder-3.4.1.tar.gz) and [its OpenPGP-signature](https://schleuder.org/download/schleuder-3.4.1.tar.gz.sig).
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # Options are listed with the behaviour encoded in the database schema.
8
8
 
9
- # Only send out enrypted emails to subscriptions?
9
+ # Only send out encrypted emails to subscriptions?
10
10
  # (This setting does not affect resend-messages.)
11
11
  send_encrypted_only: true
12
12
 
@@ -67,6 +67,7 @@ module Schleuder
67
67
 
68
68
  desc 'refresh_keys [list1@example.com]', "Refresh all keys of all list from the keyservers sequentially (one by one or on the passed list). (This is supposed to be run from cron weekly.)"
69
69
  def refresh_keys(list=nil)
70
+ GPGME::Ctx.send_notice_if_gpg_does_not_know_import_filter
70
71
  work_on_lists(:refresh_keys,list)
71
72
  permission_notice
72
73
  end
@@ -319,11 +320,15 @@ Please notify the users and admins of this list of these changes.
319
320
  private
320
321
 
321
322
  def work_on_lists(subj, list=nil)
322
- selected_lists = if list.nil?
323
- List.all
323
+ if list.nil?
324
+ selected_lists = List.all
324
325
  else
325
- List.where(email: list)
326
+ selected_lists = List.where(email: list)
327
+ if selected_lists.blank?
328
+ error("No list with this address exists: #{list.inspect}")
329
+ end
326
330
  end
331
+
327
332
  selected_lists.each do |list|
328
333
  I18n.locale = list.language
329
334
  output = list.send(subj)
@@ -0,0 +1,21 @@
1
+ module Schleuder
2
+ module Filters
3
+ def self.strip_html_from_alternative_if_keywords_present(list, mail)
4
+ if mail[:content_type].blank? ||
5
+ mail[:content_type].content_type != 'multipart/alternative' ||
6
+ mail.keywords.blank?
7
+ return false
8
+ end
9
+
10
+ Schleuder.logger.debug 'Stripping html-part from multipart/alternative-message because it contains keywords'
11
+ mail.parts.delete_if do |part|
12
+ part[:content_type].content_type == 'text/html'
13
+ end
14
+ mail.content_type = 'multipart/mixed'
15
+ mail.add_pseudoheader(:note, I18n.t('pseudoheaders.stripped_html_from_multialt_with_keywords'))
16
+ end
17
+ end
18
+ end
19
+
20
+
21
+
@@ -103,7 +103,7 @@ module GPGME
103
103
  end
104
104
 
105
105
  def refresh_key(fingerprint)
106
- args = "#{keyserver_arg} --refresh-keys #{fingerprint}"
106
+ args = "#{keyserver_arg} #{import_filter_arg} --refresh-keys #{fingerprint}"
107
107
  gpgerr, gpgout, exitcode = self.class.gpgcli(args)
108
108
 
109
109
  if exitcode > 0
@@ -136,7 +136,8 @@ module GPGME
136
136
  arguments, error = fetch_key_gpg_arguments_for(input)
137
137
  return error if error
138
138
 
139
- gpgerr, gpgout, exitcode = self.class.gpgcli(arguments)
139
+ self.class.send_notice_if_gpg_does_not_know_import_filter
140
+ gpgerr, gpgout, exitcode = self.class.gpgcli("#{import_filter_arg} #{arguments}")
140
141
 
141
142
  # Unfortunately gpg doesn't exit with code > 0 if `--fetch-key` fails.
142
143
  if exitcode > 0 || gpgerr.grep(/ unable to fetch /).presence
@@ -270,5 +271,25 @@ module GPGME
270
271
  ""
271
272
  end
272
273
  end
274
+
275
+ def self.gpg_knows_import_filter?
276
+ sufficient_gpg_version?('2.1.15')
277
+ end
278
+
279
+ def import_filter_arg
280
+ if self.class.gpg_knows_import_filter?
281
+ %{ --import-filter drop-sig='sig_created_d > 0000-00-00'}
282
+ end
283
+ end
284
+
285
+ def self.send_notice_if_gpg_does_not_know_import_filter
286
+ if ! gpg_knows_import_filter?
287
+ Schleuder.logger.notify_superadmin(
288
+ subject: 'Schleuder installation problem',
289
+ message: "Your version of GnuPG is very old, please update!\n\nWith your version of GnuPG we can not protect your setup against signature flooding. Please update to at least version 2.1.15 to fix this problem. See <https://dkg.fifthhorseman.net/blog/openpgp-certificate-flooding.html> for details on the background."
290
+ )
291
+ ''
292
+ end
293
+ end
273
294
  end
274
295
  end
@@ -18,9 +18,14 @@ module Schleuder
18
18
  notify_admin(string, original_message)
19
19
  end
20
20
 
21
- def notify_admin(thing, original_message=nil, subject='Error')
21
+ def notify_superadmin(message:, original_message: nil, subject: 'Error')
22
+ notify_admin(message, original_message, subject, superadmin)
23
+ end
24
+
25
+ def notify_admin(thing, original_message=nil, subject='Error', recipients=nil)
22
26
  # Minimize using other classes here, we don't know what caused the error.
23
27
  msg_parts = convert_to_msg_parts(thing, original_message)
28
+ recipients ||= adminaddresses
24
29
  Array(adminaddresses).each do |address, key|
25
30
  mail = Mail.new
26
31
  mail.from = @from
@@ -53,13 +53,12 @@ module Mail
53
53
  # headers, which reveals protected subjects.
54
54
  if self.subject != new.subject
55
55
  new.protected_headers_subject = self.subject.dup
56
-
57
- # Delete the protected headers which might leak information.
58
- if new.parts.first.content_type == "text/rfc822-headers; protected-headers=v1"
59
- new.parts.shift
60
- end
61
56
  end
62
57
 
58
+ # Delete the protected headers which might leak information.
59
+ if new.parts.first && new.parts.first.content_type == "text/rfc822-headers; protected-headers=v1"
60
+ new.parts.shift
61
+ end
63
62
 
64
63
  new
65
64
  end
@@ -1,3 +1,3 @@
1
1
  module Schleuder
2
- VERSION = '3.3.0'
2
+ VERSION = '3.4.1'
3
3
  end
@@ -251,6 +251,7 @@ de:
251
251
  invalid_input: "Ungültige Angabe. Gültig sind: URLs, OpenPGP-Fingerabdrücke, oder Emailadressen."
252
252
  pseudoheaders:
253
253
  stripped_html_from_multialt: Diese Email enthielt einen alternativen HTML-Teil, der PGP-Daten beinhaltete. Der HTML-Teil wurde entfernt, um die Email sauberer analysieren zu können.
254
+ stripped_html_from_multialt_with_keywords: Diese Email enthielt Schlüsselwörter und einen alternativen HTML-Teil. Der HTML-Teil wurde entfernt, um zu verhindern dass diese Schlüsselwörter Aussenstehenden bekannt werden.
254
255
  signature_states:
255
256
  unknown: "Unbekannte Signatur von unbekanntem Schlüssel 0x%{fingerprint}"
256
257
  unsigned: "Unsigniert"
@@ -255,6 +255,7 @@ en:
255
255
  invalid_input: "Invalid input. Allowed are: URLs, OpenPGP-fingerprints, or email-addresses."
256
256
  pseudoheaders:
257
257
  stripped_html_from_multialt: This message included an alternating HTML-part that contained PGP-data. The HTML-part was removed to enable parsing the message more properly.
258
+ stripped_html_from_multialt_with_keywords: This message included keywords and an alternating HTML-part. The HTML-part was removed to prevent the disclosure of these keywords to third parties.
258
259
  signature_states:
259
260
  unknown: "Unknown signature by unknown key 0x%{fingerprint}"
260
261
  unsigned: "Unsigned"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schleuder
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - schleuder dev team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-06 00:00:00.000000000 Z
11
+ date: 2019-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gpgme
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 2.6.0
39
+ version: 2.7.1
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 2.6.0
46
+ version: 2.7.1
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: mail-gpg
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -112,14 +112,14 @@ dependencies:
112
112
  requirements:
113
113
  - - "~>"
114
114
  - !ruby/object:Gem::Version
115
- version: '1'
115
+ version: 1.3.6
116
116
  type: :runtime
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
- version: '1'
122
+ version: 1.3.6
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: sinatra
125
125
  requirement: !ruby/object:Gem::Requirement
@@ -323,6 +323,7 @@ files:
323
323
  - lib/schleuder/filters/post_decryption/60_receive_signed_only.rb
324
324
  - lib/schleuder/filters/post_decryption/70_receive_encrypted_only.rb
325
325
  - lib/schleuder/filters/post_decryption/80_receive_from_subscribed_emailaddresses_only.rb
326
+ - lib/schleuder/filters/post_decryption/90_strip_html_from_alternative_if_keywords_present.rb
326
327
  - lib/schleuder/filters/pre_decryption/10_forward_bounce_to_admins.rb
327
328
  - lib/schleuder/filters/pre_decryption/20_forward_all_incoming_to_admins.rb
328
329
  - lib/schleuder/filters/pre_decryption/30_send_key.rb
@@ -391,7 +392,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
391
392
  version: '0'
392
393
  requirements: []
393
394
  rubyforge_project: "[none]"
394
- rubygems_version: 2.7.7
395
+ rubygems_version: 2.7.6.2
395
396
  signing_key:
396
397
  specification_version: 4
397
398
  summary: Schleuder is a gpg-enabled mailing list manager with remailing-capabilities.