Skip to content

Commit

Permalink
allow_other_host for discourse plugin redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
mortbauer committed Feb 16, 2024
1 parent dc23678 commit e0763cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/discourse/app/controllers/discourse_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def redirect_to_with_payload(url, payload)
base64_payload = Base64.strict_encode64 payload.to_query
sso = CGI.escape base64_payload
sig = get_hmac_hex_string base64_payload
redirect_to "#{url}#{url.include?('?') ? '&' : '?'}sso=#{sso}&sig=#{sig}"


redirect_to "#{url}#{url.include?('?') ? '&' : '?'}sso=#{sso}&sig=#{sig}", allow_other_host: true
end

def parse_payload
Expand Down

0 comments on commit e0763cf

Please sign in to comment.