st3vil/Crypt-Password — Issue #3: Make test fails with bad salt input (0.28)
Author: racke
Created: 2012-02-18 18:34:15+00:00
State: open

Bad salt input: 2-character salt cannot start with _ at t/01-crypt-password.t line 126

This happened to me on Debian Linux + Perlbrew for

lenny/5.12.3
squeeze/5.14.1
squeeze/5.14.2

Test where successful on testing/5.12.3

# os is 'linux'
No manual entry for crypt
Use of uninitialized value $line in substitution (s///) at t/01-crypt-password.t line 19.
Use of uninitialized value $line in concatenation (.) or string at t/01-crypt-password.t line 20.
# bottom line of man crypt: ''
# generate salt
# hello _WW.xkFMn = $_W$zEyJXl9iPfw
# hello _f9KbcFsO = $_f$WYJvpgPmbGA
# hello _o43z1O73 = $_o$AfOcJcPWR1E
# hello _kPYNQXRY = $_k$GU4JPXTqDI2
# hello _UI8WBeRE = $_U$igYS44ZPocs
# hello _hWslpXaZ = $_h$bHOj9QnC83Y
# hello _OuWGnKA4 = $_O$B76IGH8Fqsg
# hello _xwT4Poal = $_x$rWaExzHH4RA
# hello _7wcHIeea = $_7$AVAjE.o/aYA
# hello _rvax6GNx = $_r$qTy9YrEdaXU
# hello _hbSeaurP = $_h$bHOj9QnC83Y
# hello _QpqzXOJA = $_Q$5JGEZUAnpFQ
# hello _cAGYFju1 = $_c$rNpzSwf8.ac
# hello _nxxNP.kC = $_n$jz0I/q7F5r.
# hello _zoxmrFM4 = $_z$CLp3isbU6t2
# hello _GreabrrM = $_G$AKmU.zcDURo
# hello _17LDt2t/ = $_1$P1K5EvOec96
# hello _6VoOSWn4 = $_6$9apEqTNbM1s
# hello _RAsdy2g8 = $_R$/LU3IfNBxMQ
# hello _CqoLHEsj = $_C$.zZsGF9NYQU

# Failed test 'randomly salted hashes'
# at t/01-crypt-password.t line 27.
# got: '19'
# expected: '20'
# random salts
# hello _/LfNIMWI = $_/$19WYA4tuJRE
# hello _mYoCtSNI = $_m$Fc6SCtlkUoE
# set salts
# hello _1234abcd = $_1$P1K5EvOec96
# hello _1234abcd = $_1$P1K5EvOec96
# pass crypted as salt
# etcetc _ozMfhM/F = $_o$RZGHCWyLHjU
# etcetc _qzuIpG9N = $_q$FIEr8ef/AHY
Bad salt input: 2-character salt cannot start with _ at t/01-crypt-password.t line 126
# Looks like you failed 1 test of 6.
# Looks like your test exited with 16 just after 6.
t/01-crypt-password.t .. Dubious, test returned 16 (wstat 4096, 0x1000)
Failed 1/6 subtests
t/90-pod-syntax.t ...... skipped: Test::Pod 1.14 required
t/92-license.t ......... skipped: set TEST_LICENSE or TEST_ALL to enable this test
t/93-perltidy.t ........ skipped: set TEST_TIDY or TEST_ALL to enable this test

Test Summary Report
-------------------
t/01-crypt-password.t (Wstat: 4096 Tests: 6 Failed: 1)
Failed test: 3
Non-zero exit status: 16
Files=4, Tests=6, 1 wallclock secs ( 0.05 usr 0.01 sys + 0.14 cusr 0.07 csys = 0.27 CPU)
Result: FAIL
Failed 1/4 test programs. 1/6 subtests failed.
make: *** [test_dynamic] Erro