[DRE-commits] [ruby-omniauth-ldap] 03/06: refresh gitlab patches
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Wed Jul 22 10:43:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository ruby-omniauth-ldap.
commit f7307239cdf9a51d14c5a9fddbd750804a72c8c4
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Wed Jul 22 14:51:49 2015 +0530
refresh gitlab patches
---
debian/patches/gitlab.patch | 185 ++++++++++----------------------------------
1 file changed, 42 insertions(+), 143 deletions(-)
diff --git a/debian/patches/gitlab.patch b/debian/patches/gitlab.patch
index 1718602..bdd86e3 100644
--- a/debian/patches/gitlab.patch
+++ b/debian/patches/gitlab.patch
@@ -1,148 +1,47 @@
---- a/lib/omniauth/strategies/ldap.rb
-+++ b/lib/omniauth/strategies/ldap.rb
-@@ -3,6 +3,7 @@ require 'omniauth'
- module OmniAuth
- module Strategies
- class LDAP
-+ class MissingCredentialsError < StandardError; end
- include OmniAuth::Strategy
- @@config = {
- 'name' => 'cn',
-@@ -37,8 +38,13 @@ module OmniAuth
- def callback_phase
- @adaptor = OmniAuth::LDAP::Adaptor.new @options
+Description: gitlab fork changes
+ clone two repos, remove .git and take diff -u
+Author: Pirate Praveen <praveen at debian.org>
+Last-Updated: 2015-07-22
+
+diff -u omniauth-ldap.intridea/Gemfile omniauth-ldap.gitlabhq/Gemfile
+--- omniauth-ldap.intridea/Gemfile 2015-07-22 05:12:06.264856429 -0400
++++ omniauth-ldap.gitlabhq/Gemfile 2015-07-22 05:15:30.975422945 -0400
+@@ -3,9 +3,8 @@
+ gemspec
-- return fail!(:missing_credentials) if missing_credentials?
- begin
-+ # GITLAB security patch
-+ # Dont allow blank password for ldap auth
-+ if request['username'].nil? || request['username'].empty? || request['password'].nil? || request['password'].empty?
-+ raise MissingCredentialsError.new("Missing login credentials")
-+ end
-+
- @ldap_user_info = @adaptor.bind_as(:filter => Net::LDAP::Filter.eq(@adaptor.uid, @options[:name_proc].call(request['username'])),:size => 1, :password => request['password'])
- return fail!(:invalid_credentials) if !@ldap_user_info
-
-@@ -80,12 +86,6 @@ module OmniAuth
- end
- user
- end
--
-- protected
--
-- def missing_credentials?
-- request['username'].nil? or request['username'].empty? or request['password'].nil? or request['password'].empty?
-- end # missing_credentials?
- end
- end
+ group :development, :test do
+- gem 'guard'
+- gem 'guard-rspec'
+- gem 'guard-bundler'
+- gem 'growl'
+- gem 'rb-fsevent'
++ gem 'rspec'
++ gem 'pry'
++ gem 'rake'
++ gem 'rack-test'
end
---- a/spec/omniauth/strategies/ldap_spec.rb
-+++ b/spec/omniauth/strategies/ldap_spec.rb
-@@ -19,7 +19,7 @@ describe "OmniAuth::Strategies::LDAP" do
- }.to_app
- end
-
-- let(:session) do
-+ def session
- last_request.env['rack.session']
- end
-
-@@ -58,66 +58,23 @@ describe "OmniAuth::Strategies::LDAP" do
- @adaptor.stub(:bind_as).and_return(false)
- end
+Only in omniauth-ldap.gitlabhq/: Gemfile.lock
+diff -u omniauth-ldap.intridea/.gitignore omniauth-ldap.gitlabhq/.gitignore
+--- omniauth-ldap.intridea/.gitignore 2015-07-22 05:12:06.264856429 -0400
++++ omniauth-ldap.gitlabhq/.gitignore 2015-07-22 05:15:30.974422947 -0400
+@@ -1,3 +1,2 @@
+ .project
+ coverage
+-/Gemfile.lock
+Only in omniauth-ldap.gitlabhq/: gitlab_omniauth-ldap.gemspec
+Common subdirectories: omniauth-ldap.intridea/lib and omniauth-ldap.gitlabhq/lib
+Only in omniauth-ldap.intridea/: omniauth-ldap.gemspec
+diff -u omniauth-ldap.intridea/README.md omniauth-ldap.gitlabhq/README.md
+--- omniauth-ldap.intridea/README.md 2015-07-22 05:12:06.264856429 -0400
++++ omniauth-ldap.gitlabhq/README.md 2015-07-22 05:15:30.975422945 -0400
+@@ -1,6 +1,6 @@
+-# OmniAuth LDAP
++# GitLab fork | OmniAuth LDAP [![build status](https://secure.travis-ci.org/gitlabhq/omniauth-ldap.png)](https://travis-ci.org/gitlabhq/omniauth-ldap)
-- context "when username is not preset" do
-- it 'should redirect to error page' do
-- post('/auth/ldap/callback', {})
--
-- last_response.should be_redirect
-- last_response.headers['Location'].should =~ %r{missing_credentials}
-- end
-- end
--
-- context "when username is empty" do
-- it 'should redirect to error page' do
-- post('/auth/ldap/callback', {:username => ""})
--
-- last_response.should be_redirect
-- last_response.headers['Location'].should =~ %r{missing_credentials}
-- end
-- end
--
-- context "when username is present" do
-- context "and password is not preset" do
-- it 'should redirect to error page' do
-- post('/auth/ldap/callback', {:username => "ping"})
--
-- last_response.should be_redirect
-- last_response.headers['Location'].should =~ %r{missing_credentials}
-- end
-- end
--
-- context "and password is empty" do
-- it 'should redirect to error page' do
-- post('/auth/ldap/callback', {:username => "ping", :password => ""})
--
-- last_response.should be_redirect
-- last_response.headers['Location'].should =~ %r{missing_credentials}
-- end
-- end
-- end
--
-- context "when username and password are present" do
-- context "and bind on LDAP server failed" do
-- it 'should redirect to error page' do
-- post('/auth/ldap/callback', {:username => 'ping', :password => 'password'})
--
-- last_response.should be_redirect
-- last_response.headers['Location'].should =~ %r{invalid_credentials}
-- end
-- end
--
-- context "and communication with LDAP server caused an exception" do
-- before :each do
-- @adaptor.stub(:bind_as).and_throw(Exception.new('connection_error'))
-- end
--
-- it 'should redirect to error page' do
-- post('/auth/ldap/callback', {:username => "ping", :password => "password"})
--
-- last_response.should be_redirect
-- last_response.headers['Location'].should =~ %r{ldap_error}
-- end
-- end
-+ it 'should raise MissingCredentialsError' do
-+ post('/auth/ldap/callback', {})
-+ last_response.should be_redirect
-+ last_response.headers['Location'].should =~ %r{ldap_error}
-+ end
-+
-+ it 'should redirect to error page' do
-+ post('/auth/ldap/callback', {:username => 'ping', :password => 'password'})
-+ last_response.should be_redirect
-+ last_response.headers['Location'].should =~ %r{invalid_credentials}
-+ end
-+
-+ it 'should redirect to error page when there is exception' do
-+ @adaptor.stub(:bind_as).and_throw(Exception.new('connection_error'))
-+ post('/auth/ldap/callback', {:username => 'ping', :password => 'password'})
-+ last_response.should be_redirect
-+ last_response.headers['Location'].should =~ %r{ldap_error}
- end
- end
+-== LDAP
++### LDAP
-@@ -142,11 +99,10 @@ describe "OmniAuth::Strategies::LDAP" do
- post('/auth/ldap/callback', {:username => 'ping', :password => 'password'})
- end
+ Use the LDAP strategy as a middleware in your application:
-- it 'should not redirect to error page' do
-- last_response.should_not be_redirect
-+ it 'should raise MissingCredentialsError' do
-+ should_not raise_error OmniAuth::Strategies::LDAP::MissingCredentialsError
- end
--
-- it 'should map user info to Auth Hash' do
-+ it 'should map user info' do
- auth_hash.uid.should == 'cn=ping, dc=intridea, dc=com'
- auth_hash.info.email.should == 'ping at intridea.com'
- auth_hash.info.first_name.should == 'Ping'
+Common subdirectories: omniauth-ldap.intridea/spec and omniauth-ldap.gitlabhq/spec
+Only in omniauth-ldap.gitlabhq/: .travis.yml
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-omniauth-ldap.git
More information about the Pkg-ruby-extras-commits
mailing list