Skip to content

Commit

Permalink
Fix security issues
Browse files Browse the repository at this point in the history
- Remove the `rack` dependency, since we don't really need it.
- Fix polynomial regex and preserve the same logic
  • Loading branch information
SValkanov committed Oct 25, 2024
1 parent 00cf49c commit 557c00b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ gem 'pry-rescue'

# required for CircleCI to build properly with ruby 1.9.3
gem 'json', '~> 1.8.3'
gem 'rack', '~> 1.6.4'
4 changes: 3 additions & 1 deletion lib/netsuite/utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ def find_record(record, names, opts = {})
end

# sniff for an email-like input; useful for employee/customer searches
if !field_name && /@.*\./ =~ name
if !field_name &&
name.include?('@') &&
name.split('@')[1..].any? { _1.include?('.') }
field_name = 'email'
end

Expand Down

0 comments on commit 557c00b

Please sign in to comment.