Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -1,6 +1,4 @@
if Rails.version < '3'
config.gem 'rack-openid', :lib => 'rack/openid', :version => '>=0.2.1'
end
# frozen_string_literal: false
require 'open_id_authentication'

View file

@ -61,7 +61,7 @@ module OpenIdAuthentication
@code
end
ERROR_MESSAGES.keys.each { |state| define_method("#{state}?") { @code == state } }
ERROR_MESSAGES.each_key { |state| define_method("#{state}?") { @code == state } }
def successful?
@code == :successful
@ -87,7 +87,7 @@ module OpenIdAuthentication
# dodge XRIs -- TODO: validate, don't just skip.
unless ['=', '@', '+', '$', '!', '('].include?(identifier.at(0))
# does it begin with http? if not, add it.
identifier = "http://#{identifier}" unless identifier =~ /^http/i
identifier = +"http://#{identifier}" unless /^http/i.match?(identifier)
# strip any fragments
identifier.gsub!(/\#(.*)$/, '')
@ -109,12 +109,12 @@ module OpenIdAuthentication
# the Rails convention "open_id_identifier" because that's what
# the specification dictates in order to get browser auto-complete
# working across sites
def using_open_id?(identifier = nil) #:doc:
def using_open_id?(identifier = nil)
identifier ||= open_id_identifier
!identifier.blank? || request.env[Rack::OpenID::RESPONSE]
end
def authenticate_with_open_id(identifier = nil, options = {}, &block) #:doc:
def authenticate_with_open_id(identifier = nil, options = {}, &block)
identifier ||= open_id_identifier
if request.env[Rack::OpenID::RESPONSE]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module OpenIdAuthentication
class Association < ActiveRecord::Base
self.table_name = :open_id_authentication_associations

View file

@ -1,3 +1,5 @@
# frozen_string_literal: false
require 'openid/store/interface'
module OpenIdAuthentication
@ -29,7 +31,7 @@ module OpenIdAuthentication
Association.find_all_by_server_url_and_handle(server_url, handle)
end
assocs.reverse.each do |assoc|
assocs.reverse_each do |assoc|
a = assoc.from_record
if a.expires_in == 0
assoc.destroy

View file

@ -1,3 +1,5 @@
# frozen_string_literal: false
require 'digest/sha1'
require 'openid/store/interface'

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module OpenIdAuthentication
class Nonce < ActiveRecord::Base
self.table_name = :open_id_authentication_nonces

View file

@ -1,3 +1,5 @@
# frozen_string_literal: false
module OpenIdAuthentication
module Request
def self.included(base)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
# http://trac.openidenabled.com/trac/ticket/156
module OpenID
@@timeout_threshold = 20
@ -17,4 +19,4 @@ module OpenID
http
end
end
end
end

View file

@ -11,4 +11,4 @@ class StatusTest < Test::Unit::TestCase
assert Result[:successful].successful?
assert !Result[:successful].unsuccessful?
end
end
end