"The certificate is not trusted because no issuer chain was provided." Error with SSL + Nginx
If you use Nginx with SSL and get an intermediate certificate with your certificate you have to do this:
cat /path/to/intermediate/certificate >> /path/to/certificate
Related cards:
Files open with an error "the location is not a folder" after installing XFCE
When using gnome-open
(i.e. double-clicking a file, telling to browser to open a download, etc.) on Ubuntu you may get this error:
The location is not a folder.
It's due to the exo-utils
package which [does not play nice with gnome-open
]...
Check SSL certificates
Installing SSL certificates usually implies additionally using intermediate certificates. If one of them is missing, some SSL client implementations might fail with failures such as
curl
~ curl -v https://host-to-check
curl: (60) SSL...
Security issues with hash conditions in Rails 2 and Rails 3
Find conditions for scopes can be given either as an array (:conditions => ['state = ?', 'draft']
) or a hash (:conditions => { 'state' => 'draft' }
). The later is nicer to read, but has horrible security implications in some versions of Ru...
How to not die with ActionView::MissingTemplate when clients request weird formats
When HTTP clients make an request they can define which response formats they can process. They do it by adding a header to the HTTP request like this:
Accept: application/json
This means the client will only understand JSON respon...
Ruby: How to connect to a host with expired SSL certificate
If you need to make an HTTPS connection to a host which uses an expired certificate, do not disable certificate verifications entirely. Doing that enables e.g. man in the middle attacks.
If you accept only a single expired and known certifica...
ActiveRecord::RecordNotFound errors allow you to query the :name and :id of the model that could not be found
ActiveRecord::RecordNotFound
errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:
ActiveRecord::RecordNotFound: Couldn't find Organisation::Membership with 'id'=12 [WHE...
Bundler error: Downloading gem revealed dependencies not in the API
Recent Bundler (1.16.1) started complaining about missing dependencies in the Gemfile. This is due to a stricter handling of specifications (see attached link).
The error message looks like this:
Downloading example-gem-1.2.3 revealed depend...
Exclude your staging site from Google with robots.txt and not shoot yourself in the foot
If you want to exclude your staging site from Google using robots.txt
without running the risk to forget deleting the file once you go live, name the file robots.exclude.txt
instead.
In your Apache Vhost config, rewrite requests for the stagi...
Headless Chrome: Changing the Accept-Language header is not possible
It seems like changing the HTTP_ACCEPT_LANGUAGE
is not possible for a headless chrome.
- On Ubuntu the headless Chrome derives the Accept-Language from the operation system
- Adding the option
options.add_argument('--lang=de')
to the `Capybar...
Dealing with Solr's "404 Not Found" response
When your Solr seems to be started properly (a process is running with the correct data directory) but never responds properly and replies (via the API or web interface) with...
404 "Not Found"
... check if Solr's log directory is actually wr...