| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| |
|
|
|
| |
It is reliable in the case where the script is sourced from another
script.
|
| | |
|
| | |
|
| |
|
|
| |
Correct indentation to be consistent
|
| |
|
|
| |
Otherwise UTF-8 encoded strings will be returned as ASCII-8BIT.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
pdftohtml will use the file path as the basis for generating the
image links in the generated HTML, so we want them to be relative,
not absolute. Ruby 1.9 tempfile.path will generate an absolute
path when given the current directory as the tmpdir, whilst 2.0
and 1.8 will use a relative one.
|
| |
|
|
|
|
|
|
|
| |
This is a workaround for an issue where YAML in ruby 1.8 tags UTF-8
heavy strings as binary, resulting in them being retrieved under 1.9
as ASCII-8BIT which can't be concatenated with UTF-8.
Described as "Deep deep YAML oddness" in
https://www.zendesk.com/blog/upgrade-the-road-to-1-9/.
|
| |
|
|
| |
Items cached in 1.8 can't safely be retrieved in 1.9
|
| |
|
|
|
| |
We want the HTML to be encoding in the default encoding so that
it can be combined with other strings.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Breaks the mySociety internal deployment tooling.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Provides fix for CVE-2014-7829.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original error `ActionView::Template::Error` that this spec was
written to represent (#1406) occurred under ruby 1.8 when the decoded
non-utf-8 string was used in the locale switcher on the 'not found'
error page to generate a url for the alternative locales.
Under Ruby >= 1.9, the error thrown in that situation is an `invalid
byte sequence in UTF-8` error, thrown in the same place - the locale
switcher. However, no error seems to be thrown when the same param is
used in a request in production.
The upgrade to Rails 3.2.20 causes `String.split` to be called on the
request path in `actionpack/lib/action_dispatch/middleware/static.rb` in
order to check for attempts to access files outside the `public`
directory. This means that under Ruby >= 1.9, an `invalid byte sequence
in UTF-8` error will be thrown there in running this spec.
I think a possible solution is to use the `rack-utf8_sanitizer` gem to
provide middleware to strip invalid utf-8 from request URIs and headers
before they're processed by Rails, but it's currently unclear whether
that would have any undesirable side-effects.
|
| |
|
|
| |
Arbitrary file existence disclosure in Action Pack
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After allowing only POST requests to signup in 316b1e:
> What I think will happen at least sometimes is that someone will enter
> information in the signup form, submit it via a post request, and end
> up on the URL /profile/signup, at which point they want to refresh and
> start again, at which point they hit the URL in the address bar to do
> so. Currently that would mean they get a 404. I wonder about adding
> another route match '/profile/sign_up' => 'user#signin', :as =>
> :signin, :via => :get to handle this case. That would mean that a get
> request to profile/signup renders the empty form.
>
> – https://github.com/mysociety/alaveteli/pull/1850#issuecomment-55387700
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Protects from mass-assignment exploit attempts
|
| |\ |
|
| | |
| |
| |
| | |
Install script on AWS uses development mode by default
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Requires Hash options
|
| | | |
|
| | | |
|
| | | |
|