mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-21 10:20:05 +00:00
fix max length to 32768 for a password
This commit is contained in:
parent
f68882181d
commit
8a1003f1bd
1 changed files with 2 additions and 0 deletions
|
@ -417,6 +417,8 @@ class MPW
|
||||||
def self.password(options={})
|
def self.password(options={})
|
||||||
if not options.include?(:length) or options[:length].to_i <= 0
|
if not options.include?(:length) or options[:length].to_i <= 0
|
||||||
length = 8
|
length = 8
|
||||||
|
elsif options[:length].to_i >= 32768
|
||||||
|
length = 32768
|
||||||
else
|
else
|
||||||
length = options[:length].to_i
|
length = options[:length].to_i
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue