rmail 1.1.1 → 1.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 138243643d5e2bc5de7c471d4d8a3a6b8eb27c66
4
- data.tar.gz: 5f29da5f46e58315e00031c5882899f75409b5e0
3
+ metadata.gz: 778fd5b3c97e6779f5dfd6cf239169bf72941e7f
4
+ data.tar.gz: 68f9111d74211b7588351c3366f96e2ca497b64b
5
5
  SHA512:
6
- metadata.gz: acab621710b882343a3872c222862018989e00d1f217952f946f73973ad67f84fb283d1a0b38345fd180a8279b52cccbb5a5f7d100ff5fbaf015cb69423e312f
7
- data.tar.gz: b22be7eca80a51ff7a61e933ec76ddcb4931684202e2502df68981f45275831b8cefd317947bef840edabeb8a581364ce02b75c6e8a2f7c2d788eff2e14ca650
6
+ metadata.gz: de6cccc91f4b7780d74bff2b85c025dc0804679810003d0ffe88edd0c2969ac30ca22d843ef48d0b543846068e601dee0ec6df6defbf453d1a72c7cfbbcc909c
7
+ data.tar.gz: f38ba884a9a721201fbc3c702adfa17bd3cce5deb5f93f9e993582bff051ccfaa54cdcc7fc73195df90a8438d089e03963108b59700fb547e3ff02bec4b56e29
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ = Changes in RubyMail 1.1.2 (released 2016-01-17)
2
+
3
+ - Fix crash on invalid header encodings (Github issue #7)
4
+
1
5
  = Changes in RubyMail 1.1.1 (released 2015-11-30)
2
6
 
3
7
  - README.md updated (and renamed from README). Thanks to Aldric Giacomoni and
data/Rakefile CHANGED
@@ -166,6 +166,6 @@ task :release => [:test, :package] do
166
166
  sh 'git', 'tag', '-s', "v#{PKG_VERSION}"
167
167
  sh 'git', 'push'
168
168
  sh 'git', 'push', '--tags'
169
- sh 'gem', 'push', "pkg/#{rmail}-#{PKG_VERSION}.gem"
169
+ sh 'gem', 'push', "pkg/rmail-#{PKG_VERSION}.gem"
170
170
  end
171
171
 
@@ -73,7 +73,10 @@ module RMail
73
73
 
74
74
  class Field # :nodoc:
75
75
  # fixme, document methadology for this (RFC2822)
76
- EXTRACT_FIELD_NAME_RE = /\A([^\x00-\x1f\x7f-\xff :]+):\s*/no
76
+
77
+ # accoring to RFC2822 the header field name can consist of any
78
+ # ASCII char between and including 33 and 126.
79
+ EXTRACT_FIELD_NAME_RE = /\A(^\w[-\w]+):\s*/o
77
80
 
78
81
  class << self
79
82
  def parse(field)
@@ -1,3 +1,3 @@
1
1
  module RMail
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
@@ -1231,4 +1231,14 @@ EOF
1231
1231
  assert_equal(0, h.recipients.length)
1232
1232
  end
1233
1233
 
1234
+ def test_invalid_encoding_utf8
1235
+ _, value = RMail::Header::Field.parse('Subject: abgeändertes Angebot')
1236
+ assert_equal 'abgeändertes Angebot', value
1237
+ end
1238
+
1239
+ def test_invalid_encoding_iso_8859_1
1240
+ _, value = RMail::Header::Field.parse('Subject: abgeändertes Angebot'.encode(Encoding::ISO_8859_1))
1241
+ assert_equal 'abgeändertes Angebot'.encode(Encoding::ISO_8859_1), value
1242
+ end
1243
+
1234
1244
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Armstrong
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-30 00:00:00.000000000 Z
12
+ date: 2016-01-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: |2
15
15
  RMail is a lightweight mail library containing various utility classes and
@@ -123,7 +123,7 @@ metadata: {}
123
123
  post_install_message:
124
124
  rdoc_options:
125
125
  - "--title"
126
- - RubyMail Documentation (version 1.1.1)
126
+ - RubyMail Documentation (version 1.1.2)
127
127
  - "--main"
128
128
  - README
129
129
  - "--exclude"