We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21b676b commit a1f2f7dCopy full SHA for a1f2f7d
lib/onelogin/ruby-saml/saml_message.rb
@@ -19,15 +19,13 @@ class SamlMessage
19
PROTOCOL = "urn:oasis:names:tc:SAML:2.0:protocol".freeze
20
21
BASE64_FORMAT = %r(\A([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?\Z)
22
- @@mutex = Mutex.new
23
24
# @return [Nokogiri::XML::Schema] Gets the schema object of the SAML 2.0 Protocol schema
25
#
26
def self.schema
27
- @@mutex.synchronize do
28
- Dir.chdir(File.expand_path("../../../schemas", __FILE__)) do
29
- ::Nokogiri::XML::Schema(File.read("saml-schema-protocol-2.0.xsd"))
30
- end
+ path = File.expand_path("../../../schemas/saml-schema-protocol-2.0.xsd", __FILE__)
+ File.open(path) do |file|
+ ::Nokogiri::XML::Schema(file)
31
end
32
33
0 commit comments