| Commit message (Collapse) | Author | Age | Lines |
... | |
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ |
|
| |/ |
|
|\ \
| | |
| | |
| | | |
ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
|
| |\ \ |
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If a request is made and path is something like /%d3 we rescue this with
a custom 404 template.
This gets unescaped as {"path"=>"\323"}.
In the case of a RouteNotFound, ApplicationController#render_exception
renders the general/exception_caught template in to the default layout,
which renders the general/_locale_switcher partial.
This partial calls url_for – sending the full params hash as the
argument – so that a user may return to the existing page in their
chosen locale.
The problem is that url_for tries to construct the url with the hash
{:action=>"not_found", :controller=>"general",
:path=>"\323"}.
ApplicationController#sanitize_params re-encodes the path parameter so
that it can be passed through to url_for without trouble.
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
Conflicts:
spec/factories.rb
|
| | |
| | |
| | |
| | |
| | | |
These are full sentences, not composed on the fly, so should be easier
to translate.
|
| | |
| | |
| | |
| | |
| | | |
These notices are complete sentences, not composed on the fly, so should
be easier to translate.
|
| | |
| | |
| | |
| | |
| | | |
These notices are full sentences, rather than being composed of phrases,
which should make them easier to translate.
|
| | |
| | |
| | |
| | |
| | | |
Should have been removed in
https://github.com/mysociety/alaveteli/commit/b236d4f113187b0e5d87867fc6512e5486f9764f.
|
| | | |
|
| |/
|/|
| |
| |
| | |
Intercepts the request and redirects to the homepage if the comment
field is filled in on the contact form.
|
| |
| |
| |
| | |
The UI provides a list of comment_ids and a newstate="visible" or "hide"
|
|\ \
| | |
| | |
| | | |
ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Extract checking whether a user is banned from making Comments on an
InfoRequest to a filter in CommentController.
Removes responsibility from the #new method.
Adds a missing spec.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Extract checking whether comments are allowed on an InfoRequest to a
filter in CommentController.
Removes responsibility from the #new method.
|
| | |
| | |
| | |
| | |
| | | |
Use a before_filter to make @track_thing available to all filters
called on the same action and remove responsibility from the #new method
|
| | |
| | |
| | |
| | |
| | | |
Use a before_filter to make @info_request available to all filters
called on the same action
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes https://github.com/mysociety/alaveteli/issues/662
If /annotate/request/:url_title is accessed when comments are disabled
an exception is incorrectly thrown.
Conditionals should be used for control flow, so now the action
redirects to the info_request path and displays a notice.
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| | |
We only really want to redirect people to live sites, so pre-launch
sites don't belong in WorldFOIWebsites. Handle the case where the
current locale isn't there. Closes #1345.
|
|/
|
|
|
|
| |
Calling simple_date threw an exception as it uses a helper internally.
Only LinkToHelper is included in to the controller, so the underlying
helper was not available.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
config/general.yml-example
spec/factories.rb
|
| |
| |
| |
| |
| | |
Otherwise they get marked as fuzzy in .po files and lose their existing
translations.
|
| | |
|
| |
| |
| |
| | |
This is the most rudimentary possible way to give them access to the batch request urls, pending #1239
|
| |
| |
| |
| | |
We're going to want to actually create and send the requests later.
|
| | |
|
| |
| |
| |
| | |
Add or remove all buttons, ajax search as you type.
|
| |
| |
| |
| |
| | |
Seems like you have to specify a limit with xapian. We'll probably want
to document the limit somewhere on this page.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
They're not finding by the existing object, they're finding an existing
object.
|
| |
| |
| |
| |
| | |
Create the batch and associate new requests with it, send the outgoing
messages, and redirect to a page for the new batch.
|
| |
| |
| |
| |
| |
| | |
This duplicates what's done in the new action, but I can't currently
think of a way of sharing functionality that doesn't seem overly complex
and/or risky.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
It doesn't make logical sense that they would. However I am preserving
the ability to make batch requests as a separate thing from not having a
daily limit - I think batch sending requires a (perhaps marginally)
bigger level of trust.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Add validation, preview as in single request creation. Add comments
noting further work to be done in this action.
|
| |
| |
| |
| | |
Reuse it for the batch request page.
|
| |
| |
| |
| |
| |
| | |
Give it basic access control, and add some conditionals to the 'new'
template around bits that use @info_request.public_body so that they
render something different if @batch is assigned.
|
| |
| |
| |
| | |
Should retain a list of selected public bodies across searches.
|
| | |
|
| | |
|