Skip to content

Conversation

soartec-lab
Copy link
Contributor

Summary

Saml::Bindings::HTTPRedirect.receive_message decodes the request parameter SAMLRequest or SAMLResponse, but if neither exists, it becomes nil. Then, nil is specified in the argument of Saml :: Encoding.decode_64` method, and the following error occurs.

$ Saml::Encoding.decode_64(nil)
NoMethodError: undefined method `unpack1' for nil:NilClass
from /usr/local/lib/ruby/2.7.0/base64.rb:59:in `decode64'

This error isn't kind to the developer, so I've added a process to check that the input parameter has a SAMLRequest or SAMLResponse and raise an exception if it doesn't.

This is similar to the next PR. #176

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 99.85% when pulling 7d5c436 on soartec-lab:feature/add-invalid-params-error-in-http-redirect into ac82910 on digidentity:master.

@coveralls
Copy link

coveralls commented Feb 12, 2021

Coverage Status

Coverage increased (+0.0002%) to 99.849% when pulling 7d5c436 on soartec-lab:feature/add-invalid-params-error-in-http-redirect into ac82910 on digidentity:master.

@jdongelmans jdongelmans merged commit 7489b58 into digidentity:master Feb 12, 2021
@jdongelmans
Copy link
Contributor

Thanks again!

@jdongelmans
Copy link
Contributor

Released as v3.9.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants