rubycas / rubycas-client

Ruby client for Yale's Central Authentication Service protocol -- an open source enterprise single sign on system for web applications.
http://code.google.com/p/rubycas-client/
Other
332 stars 217 forks source link

Tried to load unspecified class: Time #99

Open nitesh-jobvite opened 8 months ago

nitesh-jobvite commented 8 months ago

Tried to load unspecified class: Time

E, [2024-02-20T07:57:41.217929 #7] ERROR -- : [\"/usr/local/lib/ruby/3.2.0/psych/class_loader.rb:99:in find'\", \"/usr/local/lib/ruby/3.2.0/psych/class_loader.rb:28:inload'\", \"/usr/local/lib/ruby/3.2.0/psych/scalar_scanner.rb:116:in parse_time'\", \"/usr/local/lib/ruby/3.2.0/psych/scalar_scanner.rb:59:intokenize'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:65:in deserialize'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:130:invisit_Psych_Nodes_Scalar'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in visit'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:inaccept'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in accept'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:320:invisit_Psych_Nodes_Document'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in visit'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:inaccept'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in accept'\", \"/usr/local/lib/ruby/3.2.0/psych.rb:334:insafe_load'\", \"/usr/local/lib/ruby/3.2.0/psych.rb:369:in load'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:96:inparse_extra_attribute_value'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:80:in block in parse'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:79:ineach'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:79:in parse'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:35:ininitialize'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/client.rb:265:in new'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/client.rb:265:inrequest_cas_response'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/client.rb:123:in validate_service_ticket'\", \"/mnt/talemetry_match_api/lib/cas_authenticator.rb:7:invalidate_ticket'\", \"/mnt/talemetry_match_api/lib/cas_authenticator.rb:12:in `validate_credentials'\", ]

parse_extra_attribute_value method in the lib/casclient/responses.rb is using YAML.load(value). With ruby 3.2 we have to explicitly specify the classes with YAML.load

Example - YAML.load_file(some_file_name, permitted_classes: [Matrix, OpenStruct, Symbol, Time])