Skip to content

Commit

Permalink
Fixing special chars addition in passwords. (#926)
Browse files Browse the repository at this point in the history
Fixes #927
  • Loading branch information
allam-matsubara authored and stympy committed Jul 10, 2017
1 parent f7133f4 commit 76dc390
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ pkg/*

.DS_Store

.idea/*
.idea/*

# Ignore rvm and rbenv files
.ruby-version
.ruby-gemset
2 changes: 1 addition & 1 deletion lib/faker/internet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def password(min_length = 8, max_length = 16, mix_case = true, special_chars = f

if special_chars
chars = %w(! @ # $ % ^ & *)
rand(min_length).times do |i|
rand(1..min_length).times do |i|
temp[i] = chars[rand(chars.length)]
end
end
Expand Down

0 comments on commit 76dc390

Please sign in to comment.