Public bug reported:

Hi,

when I generate a password hash for a user-selected password (with --clearfrom) 
that is longer than 12 characters,
the original password and hashed version are concatenated.
This output messes up my other scripts, since they expect 2 fields to be 
present when parsing.

Example:

root@melissa:~# echo AAAAAAAAAAAAA | makepasswd --crypt --clearfrom /dev/stdin
AAAAAAAAAAAAAhtgSp/lr98hzo

root@melissa:~# echo AAAAAAAAAAAAA | makepasswd --crypt --clearfrom
/dev/stdin --verbose

makepasswd v1.10 (c) 1997-1999 by Rob Levin <le...@openproject.net>,
last modified Monday, 7 April 1999 at 22:56 (UCT)
All rights reserved by the author, licensed under GPL version 2.

Password=AAAAAAAAAAAAAEncrypted String=YJS/ZC1rz5hic


The problem can be fixed in the Clear() subrouting in /usr/bin/makepasswd, by 
adding the following line (patch included):

    $CharFormat = length($Clear) + 3;


>From what I can tell, this bug is present in natty, oneiric and precise

root@melissa:~# lsb_release -rd
Description:    Ubuntu 11.04
Release:        11.04

root@melissa:~# apt-cache policy makepasswd 
makepasswd:
  Installed: 1.10-5
  Candidate: 1.10-5
  Version table:
 *** 1.10-5 0
        500 http://nl.archive.ubuntu.com/ubuntu/ natty/universe amd64 Packages
        100 /var/lib/dpkg/status


kind regards,
-- Steven

** Affects: makepasswd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/894739

Title:
  output formatting does not work decently for long user-selected
  passwords (>=13 chars)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/makepasswd/+bug/894739/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to