SECURITY: Attach DiscourseConnect (SSO) nonce to current session (#12124)

This commit is contained in:
David Taylor
2021-02-18 10:35:10 +00:00
committed by GitHub
parent 2f4630742c
commit 13d2a1f82c
8 changed files with 74 additions and 41 deletions

View File

@ -61,8 +61,8 @@ class SingleSignOn
raise RuntimeError, "sso_url not implemented on class, be sure to set it on instance"
end
def self.parse(payload, sso_secret = nil)
sso = new
def self.parse(payload, sso_secret = nil, **init_kwargs)
sso = new(**init_kwargs)
sso.sso_secret = sso_secret if sso_secret
parsed = Rack::Utils.parse_query(payload)