| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
Fixes typo in 6bd0bfe
|
|\ |
|
| |
| |
| |
| | |
Picks these up in `rake notes` and adds semantic meaning
|
|\ \ |
|
| | |
| | |
| | |
| | | |
DateTime, Date and Time all have #year methods
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| |
| | |
Users get a new response email, click the link, but get a cached page.
This is a quick fix to ensure they always see the response when clicking
the link.
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Fixes https://github.com/mysociety/alaveteli/issues/1563
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| | |
Fixes #1569
|
|\ \ |
|
| |/
| |
| |
| | |
Fixes #1448.
|
|/ |
|
|
|
|
| |
962e1d2b0edb6c0933ba42dd7690c38ba7d08f91
|
|
|
|
|
|
|
|
|
| |
Sometimes pdftohtml will generate thousands of images when converting an
image embedded in a PDF. This causes a request spike when a user tries
to view the converted PDF as HTML.
See https://bugs.freedesktop.org/show_bug.cgi?id=77932 for the bug
report.
|
| |
|
|\ |
|
| | |
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Taken from https://github.com/mikel/mail/pull/602
|
|\ \ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
TODO: We really should be testing the full output of RTF#body, but we currently
want to remain consistent with Adapters::PDF as many methods are shared between
the Adapters.
A more correct spec might be:
expected = %Q(<font size=3><font color="#000000">thisisthebody</font></font>)
adapter.body.should == expected
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
TODO: We really should be testing the full output of PDF#body, but
inconsistencies between pdftohtml prevent sensible means of doing this.
For example:
adapter.body.should == %Q(\n<A name=1></a>thisisthebody<br/>\n<hr>\n)
Fails because some versions (correctly!) use lower case tag names.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Extracts the attachment processing from FoiAttachment#body_to_html
AttachmentToHTML contains adapters which convert
- text/plain
- application/pdf
- application/rtf
Results are returned as an AttachmentHTML::HTML instance which contains
the raw HTML and other metadata about the conversion.
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Specifically using save! so that anything other than an
ActiveRecord::RecordInvalid doesn't get missed
Note that ActiveModel::Errors#full_messages includes the attribute key
in the message. This is by design, so we should consider whether we can
improve the way that we use translated validation messages.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
There's a unique index on public_bodies url_name, so we should have a
validation for that.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Should have been run after related migrations.
Could automate this to always run after migrations.
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some proxies seem to be setting the Client-IP HTTP header to 127.0.0.1.
Rails checks that Client-IP is contained in X-Forwarded-For and raises
the error.
We decided to rescue in this individual case rather than adding a
middleware to strip Client-IP
(http://writeheavy.com/2011/07/31/when-its-ok-to-turn-of-rails-ip-spoof-checking.html#well_thats_stupid_can_we_turn_it_off)
so that we don't introduce unexpected behaviour. If we start to do anything
more with request.remote_ip, then we should look at doing so.
See
http://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection
for an in-depth look at this issue.
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
will_paginate intentionally throws an ArgumentError when a non-numeric page
parameter is used. Conveniently, they tag it with WillPaginate::InvalidPage,
so here we rescue with a 404.
|
|\ \ \ |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The volume of spam in the holding pen in WDTK has increased.
Over a few weeks in January 2014 the pattern was roughly:
- 8 were sent "To" the same address, which was a nearly valid old request
address - correct hash, but missing the second hyphen.
- 1 was sent "To" an invalid request address (nearly correct hash)
- 1 was sent "BCC" a valid request address
- 1 was sent "BCC" request@whatdotheyknow.com
If a spam was sent "To" an old valid request address then it would be
rejected.
It's not entirely safe to just reject mails to old requests with any
hash, because sometimes authorities miss out a digit in the request
number, though perhaps simply getting a failure bounce would cause them
to check.
In any case that wouldn't trivially catch the most frequent case above
as it doesn't have an obvious request number.
---
We looked at greylisting and configuring the MTA with an RBL.
Greylisting was rejected as it would slow down the responsiveness of the
application when people email in. This could be revisited if/when emails
are parsed through a queue system depending on how we find the
performance there.
An RBL is already configured, but this ticket refers more to where the
email is sent rather than who it came from.
---
We elected to:
- Create spam_address model
- Add code to RequestMailer.receive to check the list of spam addresses
and silently discard an incoming mail if it's addressed to one of them
- Add page to admin interface for adding/removing spam addresses
---
Thanks to Ganesh Sittampalam for the research and Louise Crow for the
implementation strategy.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
|