Commit message (Collapse) | Author | Age | Lines | |
---|---|---|---|---|
* | Use mb_chars to prevent slicing multibyte chars under ruby 1.8 | Louise Crow | 2015-05-15 | -0/+12 |
| | | | | | | | | | | mb_chars provides a multibyte-aware wrapper for strings. It should have no effect on ruby 1.9.3 and above. Although ruby 1.8.7 wouldn't raise errors on a badly sliced multibyte string, on upgrading to ruby 1.9.3 and above, string operations such as gsub, match and join may produce ArgumentErrors with the message "invalid byte sequence in UTF-8". Additionally, a database with 'UTF-8' encoding may produce the error "PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8"" | |||
* | Refactor the application of masks and censor rules to messages. | Louise Crow | 2014-12-15 | -121/+58 |
| | | | | | | | | | | Seems more logical to make this one method that figures out what to do based on file type. Plus, incoming message does so many things, it seemed like having these related methods be separate would make them easier to read and understand. Also, email, mobile and login substitution texts weren't being translated. Finally, I think passing the censor rules and masks as arguments is a first step in some more decoupling of models. | |||
* | Allow a message with more than one event to be destroyed.hotfix/0.18.0.2 | Louise Crow | 2014-06-06 | -0/+18 |
| | | | | Fixes #1569 | |||
* | Make test specific to versions of ruby with String.encode | Louise Crow | 2014-02-24 | -4/+6 |
| | | | | The code being tested is specific in that way. | |||
* | Merge remote-tracking branch ↵ | Louise Crow | 2014-02-24 | -1/+7 |
|\ | | | | | | | 'opennewzealand_github/feature/encode-utf8-messages' into rails-3-develop | |||
| * | Add test for _get_attachment_text_internal with invalid utf-8 | Rowan Crawford | 2014-02-23 | -1/+7 |
| | | ||||
* | | Tighten up expectation, make expected files consistent. | Louise Crow | 2014-01-17 | -2/+2 |
|/ | | | | | | | Just expecting the parsed file to include the expected one would mean success in the case where nothing has been folded. Tighten up the expectation, and add quoting placeholders to expected files that didn't have them. | |||
* | Don't index hidden and requester_only incoming messages. | Louise Crow | 2013-09-16 | -0/+23 |
| | ||||
* | Adding prominence_reason to IncomingMessage. | Louise Crow | 2013-09-16 | -0/+1 |
| | ||||
* | Refactor common logic about prominence and access. | Louise Crow | 2013-09-16 | -1/+1 |
| | | | | Move it into the Ability module. | |||
* | Add a method to ask whether a user can view an incoming message. | Louise Crow | 2013-09-16 | -0/+57 |
| | ||||
* | Add response_event helper | Louise Crow | 2013-09-16 | -0/+12 |
| | | | | | Add a convenience method for getting the 'response' event associated with an incoming message. | |||
* | Add prominence to incoming message. | Louise Crow | 2013-09-16 | -0/+21 |
| | ||||
* | Re-annotate models with database fields | Louise Crow | 2013-09-16 | -0/+20 |
| | ||||
* | Prevent erroneous internal error messages with multibyte characters under ↵ | Louise Crow | 2013-07-25 | -1/+12 |
| | | | | ruby 1.8 by using mb_chars for length comparison - it counts multibyte characters. | |||
* | Merge branch 'hotfix/0.11.0.14' into rails-3-develop | Louise Crow | 2013-06-19 | -0/+10 |
|\ | ||||
| * | Allow the HTML display of the body of an email to handle the case where the ↵0.11.0.14hotfix/0.11.0.14 | Louise Crow | 2013-06-19 | -0/+10 |
| | | | | | | | | body is only quoted text and there is no subject. | |||
* | | Fix typo | Louise Crow | 2013-06-12 | -1/+1 |
| | | ||||
* | | Make sure raw emails are loaded before running test. | Louise Crow | 2013-06-12 | -0/+4 |
|/ | ||||
* | When extracting attachments for an incoming message and getting the body of ↵ | Louise Crow | 2013-05-29 | -0/+43 |
| | | | | the main part in order to look for uuencoded text, make sure that we're getting that main part from the reparsed attachments, and not getting an obsolete attachment. Fixes #958. | |||
* | Avoid an FoiAttachment validation failure under Rails 3 | Mark Longair | 2013-05-16 | -0/+11 |
| | | | | | | | | | | | 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. | |||
* | Add a new example for unconvertible-to-UTF-8 text part data | Mark Longair | 2013-05-16 | -2/+9 |
| | | | | | | | | | | | 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. | |||
* | Reload cached object after extracting attachments | Henare Degan | 2013-03-04 | -0/+1 |
| | ||||
* | Rename Configuration class to avoid conflict with ActiveSupport::Configurable | Henare Degan | 2013-03-03 | -1/+1 |
| | ||||
* | Merge branch 'rails_xss' into rails-3-spike | Matthew Landauer | 2013-01-25 | -0/+7 |
|\ | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock config/environment.rb lib/i18n_fixes.rb | |||
| * | Handle case where info request doesn't have a user_name | Louise Crow | 2013-01-07 | -0/+7 |
| | | ||||
* | | Merge remote-tracking branch 'mysociety/develop' into rails-3-spike | Matthew Landauer | 2013-01-04 | -24/+32 |
|\| | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock Rakefile app/controllers/request_controller.rb lib/tasks/rspec.rake spec/controllers/services_controller_spec.rb spec/spec_helper.rb spec/views/request/_after_actions.rhtml_spec.rb | |||
| * | Wrap specs on the extraction of RFC-822 headers in code that sets the ENV ↵ | Louise Crow | 2012-12-11 | -24/+32 |
| | | | | | | | | timezone. TMail renders headers using localtime, which is not ideal, but we're migrating away from it anyway, so I'm not sure it's worth delving into the internals of TMail to fix it. | |||
* | | Update to new RSpec module names | Henare Degan | 2012-12-12 | -1/+1 |
|/ | ||||
* | Convert url in comment to spec. | Louise Crow | 2012-12-06 | -0/+8 |
| | | | | | | Conflicts: lib/mail_handler/backends/tmail_backend.rb | |||
* | Rename _get_attachment_text_internal_one_file to ↵ | Louise Crow | 2012-12-06 | -2/+2 |
| | | | | get_attachment_text_one_file as it is now an externally-accessed method of the mail handler module. | |||
* | Move methods for getting the text out of attachments to the mail handler module. | Louise Crow | 2012-12-06 | -24/+3 |
| | ||||
* | Add spec for handling an RFC822 attachment. | Louise Crow | 2012-12-04 | -0/+18 |
| | | | | | | Conflicts: spec/models/incoming_message_spec.rb | |||
* | Add spec for the adding of headers to plain text bodies in attachments. | Louise Crow | 2012-12-04 | -0/+13 |
| | ||||
* | Rewrite and move spec so that it tests the mail handler method. | Louise Crow | 2012-12-04 | -5/+0 |
| | ||||
* | Rewrite spec to reflect delegation of low-level mail methods to mail ↵ | Louise Crow | 2012-12-04 | -23/+14 |
| | | | | handler, use mail handler methods. | |||
* | Move TMail extensions to mail handler. | Louise Crow | 2012-11-15 | -0/+20 |
| | ||||
* | Don't load raw emails data in specs that don't use it. | Louise Crow | 2012-11-15 | -18/+0 |
| | ||||
* | Factor out method for getting a mail object from a fixture file. | Louise Crow | 2012-11-15 | -10/+7 |
| | ||||
* | Use mailhandler method in incoming message specs. | Louise Crow | 2012-11-15 | -10/+5 |
| | ||||
* | Convert example in comment to failing spec, update regex to make spec pass - ↵ | Louise Crow | 2012-10-18 | -0/+9 |
| | | | | again the use of converted HTML parts in emails means extra leading spaces. | |||
* | Convert request cited in comment to failing spec, update regex to make it ↵ | Louise Crow | 2012-10-18 | -0/+8 |
| | | | | pass (we now use the HTML parts of emails by preference, so there are some leading spaces.) | |||
* | In fact, the message in the example URL was not being folded properly ↵ | Louise Crow | 2012-10-11 | -0/+7 |
| | | | | anymore. Add a failing spec using it as an example. | |||
* | Convert example url from comment into passing spec. | Louise Crow | 2012-10-11 | -0/+7 |
| | ||||
* | Clean up spec a bit. | Louise Crow | 2012-10-11 | -8/+1 |
| | ||||
* | Add test for handling a multipart mail with a linebreak in the boundary. | Louise Crow | 2012-10-11 | -0/+8 |
| | ||||
* | Remove debug line. | Louise Crow | 2012-10-11 | -1/+0 |
| | ||||
* | Handle the case where an incoming message is badly encoded and has no ↵ | Louise Crow | 2012-10-09 | -0/+10 |
| | | | | charset on the part we're using as a main part. | |||
* | Extract configuration with defaults into one module | Matthew Landauer | 2012-09-25 | -2/+1 |
| | ||||
* | Add case of a regex censor rule to test of binary masking. | Louise Crow | 2012-08-14 | -13/+20 |
| |