Skip to content

Commit

Permalink
Merge pull request #2814 from DataDog/regex-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc authored Jul 25, 2023
2 parents fa2d8a8 + 97390e5 commit defd6bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/datadog/core/utils/network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def strip_zone_specifier(ipv6)
end

def strip_ipv6_port(ip)
if /\[(.*)\](?::\d+)?/ =~ ip
if /\[([^\]]*+)\](?::\d+)?/ =~ ip
Regexp.last_match(1)
else
ip
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/tracing/distributed/trace_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def parse_priority_sampling(sampled, sampling_priority)
end

def split_tracestate(tracestate)
tracestate.split(/[ \t]*,[ \t]*/)[0..31]
tracestate.split(/[ \t]*+,[ \t]*+/)[0..31]
end

# Version 0xFF is invalid as per spec
Expand Down

0 comments on commit defd6bc

Please sign in to comment.