fixed the use of Integers in gitlab_rails Settings inside gitlab.rb #109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Within the rack_attack_git_basic_auth settings in gitlab_rails the support of integer values is needed.
At the moment all Integers will be interpreted as Strings like this:
gitlab_rails['rack_attack_git_basic_auth'] = {"bantime"=>"3600", "enabled"=>true, "findtime"=>"60", "ip_whitelist"=>["127.0.0.1", "195.65.222.171"], "maxretry"=>"10"}
And after the Puppet run with a gitlab reconfiguration gitlab breaks with the following error, as soon as rack_attack is used:
TypeError (String can't be coerced into Fixnum):
lib/gitlab/auth/ip_rate_limiter.rb:16:in
reset!' lib/gitlab/auth.rb:51:inrate_limit!'lib/gitlab/auth.rb:18:in
find_for_git_client' app/controllers/projects/git_http_client_controller.rb:117:inhandle_basic_authentication'app/controllers/projects/git_http_client_controller.rb:31:in
authenticate_user' lib/gitlab/request_profiler/middleware.rb:15:incall'lib/gitlab/middleware/go.rb:16:in
call' lib/gitlab/middleware/readonly_geo.rb:29:incall'With the Fix in gitlab.rb.erb the rack_attack_git_basic_auth settings will be interpreted correctly.