| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
This causes several specs to fail.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Gemfile
app/views/admin_request/edit_outgoing.html.erb
config/packages
doc/CHANGES.md
doc/INSTALL.md
spec/models/info_request_spec.rb
spec/models/public_body_spec.rb
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems to be the bug mentioned here:
http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/
That explains that some versions of Iconv don't ignore
invalid characters when converting to UTF-8 even with
//IGNORE if that invalid character happens to be at the end
of the string. In fact, as Matthew Somerville pointed out,
with some versions of iconv (e.g. 1.14 on Mac OS, apparently)
it's necessary to add and remove more than one space at the end,
in case the first character of the byte sequence indicates a
long sequence. We add and remove 4 to be on the safe side.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes 'hello.txt' to 'hello-world.txt' in the
incoming-request-two-same-name.email fixture. The reasoning
for this change is that if there are no special characters in
the filename then filename and display_filename will be the
same and the tests won't pick up any confusion between the
two.
The test requests to :get_attachment and
:get_attachment_as_html should get the display_filename rather
than filename.
|
|
|
|
|
|
|
|
|
|
| |
The behaviour of the TMail backend's 'to' and 'cc' methods
where there was a malformed To: or Cc: line was to return
nil, whereas Mail returns a version of the string anyway.
We'd have to change quite a lot of code to deal with an
extra possible class of returned objects, so it's simplest
for the moment to monkey-patch Mail::Message's 'to' and 'cc'
methods to restore the old behaviour.
|
|
|
|
|
|
|
|
|
|
|
| |
Under Rails 3, the uudecoded FoiAttachment in this test
fails validation at the self.save! in
IncomingMessage.parse_raw_email, although the FoiAttachment
has been correctly created and saved to the database in
_uudecode_and_save_attachments. Forcing a reload=true on
self.foi_attachments fixes this.
Thanks to Louise Crow for finding the fix for this problem.
|
|
|
|
| |
no charset field.
|
|
|
|
|
|
|
|
|
|
|
| |
The example file that was used for checking for text
attachment data which could not be converted to UTF-8 is
one that we *can* actually deal with by guessing the
character set, since it's valid GB18030. So, this commit
changes that test to check for the first few Chinese
characters in that email, and introduces a replacement
test with text from /dev/random, which should not be
interpretable in any sensible way.
|
|
|
|
|
|
|
| |
This example email indicates the wrong charset and includes
a top bit set character despite Content-Transfer-Encoding: 7bit
- nonetheless, we should be able to convert it to UTF-8 and
interpret the character correctly.
|
|
|
|
|
|
|
|
|
| |
If there is a missing final MIME boundary, the behaviour
of Alaveteli with the TMail backend was to still parse
the attachment, but with the new code it currently throws
an exception. This commit adds a test that asserts that
the attachment should be parsed despite the email being
malformed in this way.
|
|
|
|
|
|
|
|
|
|
|
| |
There is currently a difference in behaviour in the parsing
of nested MIME multipart attachments between the Mail and
TMail based backends. This commit adds a test that will
pass if the behaviour is the same as the the old (TMail-based)
version, which I believe is correct according to RFC 1521.
The example email has a PNG attachment after the final MIME
boundary, and the RFC says that anything after the final
boundary ("the epilogue") should be ignored.
|
|
|
|
|
|
|
|
|
|
|
| |
These two cases were ignored previously, and we need to make sure
that they still are under the switch from TMail to Mail.
One TNEF attachment is a heavily truncated one from a real example
from Alaveteli that has no personal data in it. The other is
an example from the tests in the distribution of the tnef
package for Ubuntu 1.4.9-1 - it's an HTML version of the US
constitution.
|
|
|
|
| |
non-standard require - bundler should be supplying the gem now.
|
| |
|
|
|
|
|
|
| |
Conflicts:
lib/mail_handler/backends/tmail_backend.rb
|
| |
|
|
|
|
| |
the specific handling of a bad end boundary in tmail.
|
|
|
|
|
|
| |
Conflicts:
spec/models/incoming_message_spec.rb
|
| |
|
|
|
|
| |
the mail handler.
|
|
|
|
| |
again the use of converted HTML parts in emails means extra leading spaces.
|
|
|
|
| |
pass (we now use the HTML parts of emails by preference, so there are some leading spaces.)
|
|
|
|
| |
anymore. Add a failing spec using it as an example.
|
| |
|
|
|
|
| |
charset on the part we're using as a main part.
|
| |
|
| |
|
|
|
|
| |
Test that duplicate requests are coalesced on the front page.
|
|
|
|
|
|
| |
Add some more test data, and fix the tests to accommodate both this
new test data and the fact that raw emails are now correctly loaded
into the test environment.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously there was just one raw email, and the test code relied
on that fact. Generalise it to handle multiple raw emails.
This change causes a number of tests to fail, because it exposes
failures that should have happened when the second raw email was
added but were masked by the fact that the text of this second
raw email was never loaded. These failures will be fixed in the
next commit.
|
| |
|
|
|
|
| |
and HTML emails with encoding in a meta-tag). Fixes #281
|
| |
|
| |
|
| |
|
|\ |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Slightly improved detection of out-of-office messages, + tests.
|
|/ /
| |
| |
| | |
Fixes #60
|
| | |
|
| |
| |
| |
| | |
replying to them. Fixes #137 (partially)
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
config/general.yml-example
spec/models/track_mailer_spec.rb
|
| |
| |
| |
| |
| | |
Add support for multipart/report bounce messages to script/handle-mail-replies.
Also add a spec test for this script.
|
|/ |
|