Skip to content

Commit

Permalink
fix: prevent unintentional modification of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
coneill-enhance authored Mar 3, 2023
1 parent 94721a7 commit 1d20aa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datadog/kit/appsec/events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.track_login_success(trace, user:, **others)
track(LOGIN_SUCCESS_EVENT, trace, **others)

user_options = user.dup
user_id = user.delete(:id)
user_id = user_options.delete(:id)

raise ArgumentError, 'missing required key: :user => { :id }' if user_id.nil?

Expand Down

0 comments on commit 1d20aa8

Please sign in to comment.