-
-
Notifications
You must be signed in to change notification settings - Fork 592
Several improvements about how XML is parsed. #782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2.x
Are you sure you want to change the base?
Conversation
pitbulk
commented
Nov 30, 2025
- Rename safe_load_nokogiri into safe_load_xml.
- Refactor of safe_load_xml method.
- Improve how handle XML that contains syntax errors, added test.
- Prevent exceptions on .at_xpath called when the document was not loaded and user invoke elements accesor by checking the @document is not nil.
5278ea6 to
0e9e57d
Compare
0e9e57d to
a7c847f
Compare
|
@johnnyshields, @ahacker1-securesaml any chance to check my PR? Thanks |
|
I think this is good (security-wise). I'm not really concerned about XML parsing, what I am most concerned about is the signature verification components. Right before releases 2.x, I will raise my concerns about the SignedDocumentValidator class |
|
@ahacker1-securesaml, we want to release 2.x soon, so please share your concerns |
|
I shared them here: Main issues: ruby-saml/lib/ruby_saml/response.rb Line 939 in 6798442
You should be using canonicalized_subject, not subject. Everything else from the PR review applies. The general idea is that you want to load exactly the same bytes as the underlying cryptography library uses. So when you call openssl on some piece of data, you need to make sure you actually use it, and not some other piece of data. |