Skip to content

Commit

Permalink
consistent regex
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 committed Sep 6, 2024
1 parent ca8425d commit 5a591c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ldclient-rb/impl/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def self.validate_application_info(app, logger)
#
def self.validate_payload_filter_key(value, logger)
return nil if value.nil?
return value if value.is_a?(String) && /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.match?(value)
return value if value.is_a?(String) && /^[a-zA-Z0-9][._\-a-zA-Z0-9]*$/.match?(value)

logger.warn {
"Invalid payload filter configured, full environment will be fetched. Ensure the filter key is not empty and was copied correctly from LaunchDarkly settings."
Expand Down

0 comments on commit 5a591c7

Please sign in to comment.