Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • Sympl Sympl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 63
    • Issues 63
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Sympl
  • SymplSympl
  • Issues
  • #137
Closed
Open
Created Apr 14, 2019 by Paul Cammish@kelduumOwner

Symbiosis: Don't crash if a password file is empty

Imported from https://www.github.com/BytemarkHosting/symbiosis/issues/110

As reported here:

  • https://forum.bytemark.co.uk/t/empty-password-crashes-cron-job/2744

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?
Edited Apr 14, 2019 by Paul Cammish
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking