FIX: skip adding sso diagnostics if sso object is nil

This commit is contained in:
Arpit Jalan 2018-12-19 20:54:35 +05:30
parent e655e1863f
commit 1ea0cbece8
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ class SessionController < ApplicationController
sso = DiscourseSingleSignOn.parse(request.query_string)
rescue DiscourseSingleSignOn::ParseError => e
if SiteSetting.verbose_sso_logging
Rails.logger.warn("Verbose SSO log: Signature parse error\n\n#{e.message}\n\n#{sso.diagnostics}")
Rails.logger.warn("Verbose SSO log: Signature parse error\n\n#{e.message}\n\n#{sso&.diagnostics}")
end
# Do NOT pass the error text to the client, it would give them the correct signature