HTTP Digest Authentication Removed -Gerrit - gerrit

I have upgraded my gerrit application from 2.11.7 to 2.14.1 , but i am not getting https in my url. it looks like only http is present . In gerrit 2.14.1 release notes I can see HTTP Digest Authentication Removed .Does that mean we can't use https anymore ?

No, you can continue using https.
Check the httpd.listenUrl option in the GERRIT_SITE/etc/gerrit.config file. Are you using "https" there?
Ex:
[httpd]
listenUrl = proxy-https://localhost:8080/

Related

"Can't verify CSRF token authenticity" after new build on Heroku (Rails)

Just after a new deploy all POST request started throwing error 422 and "Can't verify CSRF token authenticity."
I rolled back to previous deploy and worked. I suspected an error on the code base (all thou nothing looked strange). So reverted to the exact same code as the build that worked. Push again but didn't help.
Have tried:
Build exact same code as the las deploy that worked.
Different browsers, incognito modes, errase cookies
Change SECRET_KEY_BASE
Restart server
Any advise apreciated.
Using rails 5.0.7.2
It was Rails5 + Heroku + CloudFlare as explained here:
http://til.obiefernandez.com/posts/875a2a69af-cloudflare-flexible-ssl-mode-breaks-rails-5-csrf
"The solution is simple. Make sure you have working SSL and HTTPS on Heroku (or wherever you're serving your Rails application.) Turn Cloudflare SSL to Full mode. Problem solved."

How to make a Rails app on Google App Engine redirect to HTTPS

I have successfully deployed my Rails app to the Google App Engine (my domain is also hosted by Google), and now I would like to redirect anyone going to my http:// address to my https:// address.
I have found the documentation to do so for a Python app here using the handlers element in the app.yaml file, and have attempted to replicate it in my own.
My app.yaml file now contains this:
handlers:
- url: /.*
script: config/application.rb
secure: always
redirect_http_response_code: 301
However I can still visit http:// without being redirected, and I think that it's because of the script: config/application.rb option that I've passed. I have no idea which file I should use or what that file should contain in a Rails app. Deployment breaks if I do not pass the script option.
Let me know if you need any more info, and thanks in advance for your help!
Well you can enforce SSL through your app's config/environments/production.rb file, you just need to add one line:
Rails.application.configure do
# Other code...
config.force_ssl = true # add this line to force HTTPS on production
end
This will do 3 things for your application, actually:
TLS redirect
Secure cookies: Sets the secure flag on cookies
HTTP Strict Transport Security (HSTS)
Read more about your application's configuration at http://guides.rubyonrails.org/configuring.html

Remove ember-cli-mirage from ember

I am using ember-cli-mirage to serve for requests. As I have my rails api to serve those request, how i shd remove or uninstall ember-cli-mirage from my ember ?
If am removing mirage folder, am getting build error !!
You should leave Mirage installed (and the folder on disk) but disable the server whenever you want to use your actual backend API. This will let you use Mirage in selective environments, for example in testing.
By default, Mirage is disabled in production, and also in development when using the -proxy option.
To disable Mirage explicitly, you can set the enabled config option to false. For example, to always disable in development:
// config/environment.js
...
if (environment === 'development') {
ENV['ember-cli-mirage'] = {
enabled: false
};
}
Leave mirage installed, if you want to use your backend api just launch ember with
ember s --proxy http://localhost:8000
if api's are running on your machine on port 8000.
More info on mirage official site: http://www.ember-cli-mirage.com/docs/v0.3.x/configuration/#enabled

Error fetching public key while encrypting environment variable for Travis CI

I'm using travis (0.0.6) and I get the same error as described in Add secret environment variable to Travis CI:
[bdu-padrino (master)]$ travis encrypt mariusbutuc/bdu-padrino MY_SECRET_ENV=super_secret
About to encrypt 'MY_SECRET_ENV=super_secret' for 'mariusbutuc/bdu-padrino'
There was an error while fetching public key, please check if you entered correct slug
even after editing lib/travis/cli/secure_key.rb to
use either https or http URL to retrieve the public key,
either skip the SSL certificate verification or not.
What else can I check to ensure encrypting works?
Also in the browser, travis-ci.org/mariusbutuc/bdu-padrino.json shows Loading forever...
What's expected to be rendered here?
Version 0.0.6—or any version prior to 0.0.10—fails because the endpoint for keys has been changed.
To fix it, simply update lib/travis/cli/secure_key.rb to the one in version 0.0.10,
or update the gem.

Why does grails URL params decoding behave differently on server vs. local

Let's say I have the following entry in my grails URLMappings.groovy:
"/actionName/param1"(controller:'myController', action:'myAction')
When I call an URL where param1 includes + as a special character, the URL is encoded correctly to /actionName/my%2Bparam for example, both in my local and in my server environment.
In my local environment - also using "prod" as the environment parameter - this is correctly resolved to my+param in the controller. However in my "real" production environment (Amazon Web Service EC2 instance), the URL is resolved to "my param" which is wrong.
I have no idea what the reason for this could be. Both environments use TomCat, and as stated above I'm even using the prod environment settings in my local environment so it can't be a differing configuration between development and production.
Does anybody have an idea where I could dig deeper to identify the problem?
Is the EC2 instance running Apache in front of Tomcat? I've had issues before with params being decoded twice, once by Apache and then again by Tomcat. From memory, I think I adjusted the configuration of the ProxyPass directive in Apache to correct it.
EDIT:
I found the following instructions I'd left with the source code for my app :)
Apache httpd.conf additions
AllowEncodedSlashes On
ProxyTimeout 3600
We also upgraded apache 2.2.12+ to fix HEAD > GET rewrite bug using a startup shell script.
I also added 'nocanon' option to ProxyPass directive to stop auto decoding by mod_proxy in /etc/httpd/conf.d/cluster.conf
I think I had to do this on the server as you can't modify this using the GUI. I also have a note that says it causes they query string to be encoded. Perhaps I had to add an extra decode in my app to handle this (sorry can't remember for sure!)
Tomcat startup parameters
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true
I think this was to get tomcat to handle slashes correctly
cheers
Lee
That's a known bug that has been introduced in Groovy 1.3.4 or few build versions before. It has been fixed in current version 1.3.5.
this is correctly resolved to my+param
in the controller
No, the expected resolution is "my param" (with a space).
As that works at the Amazon host, you'd upgrade Grails to 1.3.5, locally.

Resources