Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't crash if a password file is empty #110

Closed
skx opened this issue Oct 31, 2017 · 0 comments
Closed

Don't crash if a password file is empty #110

skx opened this issue Oct 31, 2017 · 0 comments
Labels

Comments

@skx
Copy link
Contributor

skx commented Oct 31, 2017

As reported here:

The following code reproduces the problem:

    #!/usr/bin/ruby
    require 'cracklib'
    c = CrackLib::Fascist(nil)
    if c.ok?
       puts "OK"
    end

The following patch is probably sufficient to resolve the problem, but requires a test-case:

   --- a/common/sbin/symbiosis-password-test
   +++ b/common/sbin/symbiosis-password-test
   @@ -155,6 +155,7 @@ Symbiosis::Domains.each(prefix) do |domain|
        end
    
        ftp_users.each do |u|
   +      next if c.nil?
          c = CrackLib::Fascist(u.password)
    
          if c.ok?
@skx skx added the bug label Oct 31, 2017
@skx skx closed this as completed Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant