rack_entra_id_auth 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29ef311589b5f501d12f9985485ca79ad578e69df4f240c27e453a2678193985
4
- data.tar.gz: 2d355ef1ac8745e05b5a44acd7d25e078b901378d986b1ed3f19c4f395048d73
3
+ metadata.gz: bd119fc9bb232089c907b92b30f5d92741b749e328c7330a6f79c10d841dbf04
4
+ data.tar.gz: 35b4e6bee89780c0e7c6a8fa9ca027ceccf5c59e05f78190f4e03ce98e8a5bb7
5
5
  SHA512:
6
- metadata.gz: '078b9ab3c8aff844ccf41f2ef27028dcadebf3bf64079f7a40b9b401433526f4fe945663d5db820d4079b2cf3276e36e4949b8805a7ea28e4772c4e3a914529d'
7
- data.tar.gz: 9ff39092d23a77e72c41562dfdb78821b26fb190fa39ef4d23dbbfe764621035445edf390af968623a2bfe08bb67eb3576c0932ca17c13730d056d307c5e8be9
6
+ metadata.gz: 9f9e7a92450030942c267fb89b9759a804bffce0d50e6a8620917b8f26971fb8f672e65a2219103f0ddbfc9a41ebde1bdd5dd0adee63303466f5b4fc4e53ac98
7
+ data.tar.gz: cf85143982877a4a9c3f8d75cda39e528b37ad71d9d1f4e84e40ecda03de46e4aeaba0e6c2dfd685b1457f6a09798585325ea6ae79c3c6d50d893ccfd30e01c5
@@ -86,7 +86,7 @@ module RackEntraIdAuth
86
86
  end
87
87
 
88
88
  def ruby_saml_settings
89
- config.to_h.slice(*RUBY_SAML_SETTINGS)
89
+ config.to_h.slice(*RUBY_SAML_SETTINGS).compact
90
90
  end
91
91
  end
92
92
  end
@@ -1,4 +1,5 @@
1
1
  require 'ruby-saml'
2
+ require 'uri'
2
3
 
3
4
  module RackEntraIdAuth
4
5
  class EntraIdRequest
@@ -80,7 +81,10 @@ module RackEntraIdAuth
80
81
  # @return [String]
81
82
  #
82
83
  def relay_state_url
83
- request.get_header('rack.request.form_hash')['RelayState'] rescue request.params['RelayState'] || base_url
84
+ relay_state = ''
85
+ relay_state = request.get_header('rack.request.form_hash')['RelayState'] if request.has_header?('rack.request.form_hash')
86
+ relay_state = request.params['RelayState'] if !relay_state.is_a?(String) or relay_state.empty?
87
+ relay_state =~ /\A#{URI::regexp(['http', 'https'])}\z/ ? relay_state : base_url
84
88
  end
85
89
 
86
90
  # A single sign-on response for the SAMLResponse in the request's header.
@@ -1,3 +1,3 @@
1
1
  module RackEntraIdAuth
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack_entra_id_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Susco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-21 00:00:00.000000000 Z
11
+ date: 2025-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -119,7 +119,7 @@ licenses:
119
119
  - MIT
120
120
  metadata:
121
121
  bug_tracker_uri: https://github.com/dsusco/rack_entra_id_auth/issues
122
- changelog_uri: https://github.com/dsusco/rack_entra_id_auth/releases/tag/v1.3.0
122
+ changelog_uri: https://github.com/dsusco/rack_entra_id_auth/releases/tag/v1.3.1
123
123
  homepage_uri: https://github.com/dsusco/rack_entra_id_auth
124
124
  source_code_uri: https://github.com/dsusco/rack_entra_id_auth
125
125
  post_install_message: