aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Move updating of derived attributes to a concern.mimesLouise Crow2015-06-29-33/+84
| | | | | | Add spec to demonstrate that admin-added bodies aren't getting derived attributes. Add a spec to demonstrate the problem setting the first letter for translations. Demonstrate failure to update derived attributes in translations.
* Add a AdminColumn concernJames McKinney2015-06-29-46/+30
|
* Merge branch 'hotfix/0.21.0.40'HEAD0.21.0.40masterLouise Crow2015-06-25-7/+58
|\
| * Bump alaveteli version.hotfix/0.21.0.40Louise Crow2015-06-25-1/+1
| |
| * Handle non-UTF8 encoding in ruby 1.9 and aboveLouise Crow2015-06-25-6/+57
|/
* Merge branch 'hotfix/0.21.0.39'0.21.0.39Louise Crow2015-06-23-3/+3
|\
| * Bump Alaveteli versionhotfix/0.21.0.39Louise Crow2015-06-23-1/+1
| |
| * Use BASH_SOURCE to return the script path.Louise Crow2015-06-23-2/+2
|/ | | | | It is reliable in the case where the script is sourced from another script.
* Merge branch 'hotfix/0.21.0.38'0.21.0.38Gareth Rees2015-06-17-1/+1
|\
| * Bump alaveteli versionGareth Rees2015-06-17-1/+1
|/ | | | Forgot to bump it in 0.37
* Bump alaveteli versionGareth Rees2015-06-17-1/+1
|
* Merge branch 'hotfix/0.21.0.37'0.21.0.37Gareth Rees2015-06-15-1974/+1946
|\
| * Update translationshotfix/0.21.0.37Gareth Rees2015-06-15-1974/+1946
|/
* Merge branch 'hotfix/0.21.0.36'0.21.0.36Gareth Rees2015-06-04-12/+2920
|\
| * Bump alaveteli versionhotfix/0.21.0.36Gareth Rees2015-06-04-1/+1
| |
| * Correctly set uuencoded attachment file size2508-hotfix-bad-uudecodeGareth Rees2015-06-04-2/+2
| |
| * Use Ruby to decode uuencoded attachmentsGareth Rees2015-06-03-6/+2881
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby can natively decode uuencoded text with String#unpack. [1] This avoids the uuencode program dependency and avoids writing tempfiles. The actual implementation is taken from mail [2]. The UnixToUnix module is not available in our bundled version of mail. This commit includes a spec to illustrate the failure of uuencode(1) to decode the particular attachment in incoming-request-bad-uuencoding-2. email. Parsing with uuencode returns the following error: External Command: Error from command "uudecode -o /dev/stdout /tmp/foiuu20150530-14811-u6j936": uudecode: /tmp/foiuu20150530-14811-u6j936: No `end' line The file _is_ created and appears to be OK, but the exit code is 1. This causes AlaveteliExternalCommand to fail and return nil. See #2508 [3] for the bug report. [1] http://ruby-doc.org/core-1.8.7/String.html#method-i-unpack [2] https://github.com/mikel/mail/blob/bc4c9bb9321e9d36a678692f2f562d3146b63f78/lib/mail/encodings/unix_to_unix.rb#L7 [3] https://github.com/mysociety/alaveteli/issues/2508
| * Clean IncomingMessage#_uudecode_and_save_attachmentsGareth Rees2015-06-03-3/+3
| | | | | | | | | | each instead of for remove self avoid explicit return
| * Add spec for simple uuencoded attachmentGareth Rees2015-06-03-0/+33
|/ | | Inspired by https://github.com/mikel/mail/commit/bc4c9bb9321e9d36a678692f2f562d3146b63f78
* Bump Alaveteli version0.21.0.35hotfix/0.21.0.35Louise Crow2015-05-29-1/+1
|
* Go back to setting up xapian index with fixturesLouise Crow2015-05-29-4/+6
| | | | | | Skipping this seems to have some unexpected interaction with fixture data. https://travis-ci.org/mysociety/alaveteli/jobs/64446161
* Address#to_s changes the input passed to it - dup before calling.Louise Crow2015-05-28-3/+20
| | | | Otherwise UTF-8 encoded strings will be returned as ASCII-8BIT.
* Bump alaveteli version0.21.0.34hotfix/0.21.0.34Louise Crow2015-05-28-1/+1
|
* Fix encoding issue with searching for macronsCaleb2015-05-28-35/+48
| | | | Correct indentation to be consistent
* Bump alaveteli version0.21.0.33hotfix/0.21.0.33Louise Crow2015-05-28-1/+1
|
* Merge branch 'handle-unparsed-email-as-binary' into hotfix/0.21.0.33Louise Crow2015-05-28-33/+64
|\
| * Handle unparsed email contents as binary.Louise Crow2015-05-26-14/+59
| | | | | | | | | | | | | | | | | | | | | | I think I was wrong in a83b379fd2d676172855825d0592937b234371e2 in assuming that all email gets properly encoded for transfer. Looking at the mail gem load method https://github.com/mikel/mail/blob/b159e0a542962fdd5e292a48cfffa560d7cf412e/lib/mail/mail.rb#L175a, it reads raw email content from a file in binary mode. So this commit makes both reading and writing the raw_email a binary mode operation and adds a data_as_text method for displaying the data in the admin interface that coerces it to valid utf-8.
| * Cleanup spec.Louise Crow2015-05-22-13/+14
| | | | | | | | Move setup to spec - not in common with other specs.
| * Remove obsolete testLouise Crow2015-05-22-19/+4
| | | | | | | | | | We don't write the data for a raw email to the database anymore. It's written to a file.
* | Add required setupLouise Crow2015-05-28-11/+18
| |
* | Make sure regexes used in highlight helper are UTF-8 encodedLouise Crow2015-05-28-0/+1
| |
* | Make sure spelling corrections are encoded as UTF-8Louise Crow2015-05-28-1/+33
| |
* | Cleanup spec.Louise Crow2015-05-26-52/+54
| | | | | | | | Remove unneeded setup, fixtures are not used in these specs.
* | Move acts_as_xapian specs to own file.Louise Crow2015-05-26-71/+73
| |
* | Bump alaveteli version0.21.0.32hotfix/0.21.0.32Louise Crow2015-05-26-1/+1
|/
* Handle invalid 'to' addresses.Louise Crow2015-05-22-1/+11
|
* Bump Alaveteli version0.21.0.31Louise Crow2015-05-15-1/+1
|
* Use mb_chars to prevent slicing multibyte chars under ruby 1.8Louise Crow2015-05-15-1/+13
| | | | | | | | | | 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""
* Bump alaveteli version0.21.0.30hotfix/0.21.0.30Louise Crow2015-05-15-1/+1
|
* Merge branch 'master' of ssh://git.mysociety.org/data/git/public/alaveteli ↵Louise Crow2015-05-15-4/+33
|\ | | | | | | into hotfix/0.21.0.30
| * Merge branch 'hotfix/0.21.0.29'0.21.0.29Gareth Rees2015-05-13-4/+1
| |\
| | * Bump alaveteli versionGareth Rees2015-05-13-1/+1
| | |
| | * Remove mistakenly committed specGareth Rees2015-05-13-3/+0
| |/ | | | | | | | | Mistakenly committed from previous version of da6c11531a761847ee129f92677a44fdb02de04e
| * Merge branch 'hotfix/0.21.0.28'0.21.0.28Gareth Rees2015-05-13-4/+36
| |\
| | * Bump alaveteli versionhotfix/0.21.0.28Gareth Rees2015-05-13-1/+1
| | |
| | * Discard rejected responses with malformed From:Gareth Rees2015-05-13-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Stops the RequestMailer trying to send a stopped_responses mail if the To: address can’t be parsed from the incoming message. ArgumentError: An SMTP To address is required to send a message. Set the message smtp_envelope_to, to, cc, or bcc address.
| | * Add explaining commentsGareth Rees2015-05-13-0/+2
| | |
| | * Sensible error messageGareth Rees2015-05-13-1/+1
| | |
| | * Put emails with malformed To: field in holding penGareth Rees2015-05-13-1/+7
| | | | | | | | | | | | | | | Prevents mailin exiting with an error code of 75 and sending error reports to the team@ email address.
| | * Use each instead of forGareth Rees2015-05-13-1/+2
| |/ | | | | | | Extract email collection to explaining variable