Skip to content

Commit

Permalink
Skip authentication if API key is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
lacek committed Feb 3, 2016
1 parent 6a66c34 commit 87d040d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/github_hook_controller.rb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def update_repository(logger)

def check_enabled
User.current = nil
unless Setting.sys_api_enabled? && params[:key].to_s == Setting.sys_api_key
unless Setting.sys_api_enabled? && (Setting.sys_api_key.empty? || params[:key].to_s == Setting.sys_api_key)
render :text => 'Access denied. Repository management WS is disabled or key is invalid.', :status => 403
return false
end
Expand Down

0 comments on commit 87d040d

Please sign in to comment.