Two bug fixes
This commit is contained in:
@@ -175,7 +175,7 @@ class OidcAuthController < ApplicationController
|
|||||||
# JWT claim extraction and validation
|
# JWT claim extraction and validation
|
||||||
def extract_claims_from_id_token(id_token)
|
def extract_claims_from_id_token(id_token)
|
||||||
# Decode JWT without verification first to get claims
|
# Decode JWT without verification first to get claims
|
||||||
decoded_jwt = JWT.decode(id_token, nil, false).first
|
decoded_jwt = JSON::JWT.decode(id_token, :skip_verification)
|
||||||
|
|
||||||
{
|
{
|
||||||
sub: decoded_jwt['sub'],
|
sub: decoded_jwt['sub'],
|
||||||
|
|||||||
@@ -153,8 +153,8 @@ validate :targets_must_be_array
|
|||||||
return nil unless matches_network_range?(network_range)
|
return nil unless matches_network_range?(network_range)
|
||||||
|
|
||||||
rule = Rule.create!(
|
rule = Rule.create!(
|
||||||
rule_type: 'network',
|
waf_rule_type: 'network',
|
||||||
action: policy_action,
|
waf_action: policy_action,
|
||||||
network_range: network_range,
|
network_range: network_range,
|
||||||
waf_policy: self,
|
waf_policy: self,
|
||||||
user: user,
|
user: user,
|
||||||
|
|||||||
Reference in New Issue
Block a user