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

t/02-generate-passwords.t fails with Type-Tiny-2.000001 #42

Open
eclipseo opened this issue Oct 23, 2022 · 1 comment
Open

t/02-generate-passwords.t fails with Type-Tiny-2.000001 #42

eclipseo opened this issue Oct 23, 2022 · 1 comment

Comments

@eclipseo
Copy link

After upgrading Type-Tiny from 1.016010 to 2.000001 t/02-generate-passwords.t fails like this:

t/01-defined-constants.t ... ok
#   Failed test 'password generation with named argument 'dictionary_list''
#   at t/02-generate-passwords.t line 28.
#   Failed test 'password generation with named argument 'dictionary_file''
#   at t/02-generate-passwords.t line 35.
#   Failed test 'password generation with named arguments 'dictionary_file' & 'dictionary_file_encoding''
#   at t/02-generate-passwords.t line 41.
# Looks like you failed 3 tests of 10.
t/02-generate-passwords.t .. 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/10 subtests 

This is triggered by this change in Type-Tiny tobyink/p5-type-tiny@4baba12:

commit 4baba12312f45d2e657468e26b64c643687651d1 (HEAD)
Author: Toby Inkster <[email protected]>
Date:   Sun Sep 11 19:16:15 2022 +0100

    Bring multisig functionality into the v2 API

I can reduce the reproducer to:

perl -T -I/tmp/p5-type-tiny/lib -Ilib -e 'use Crypt::HSXKPasswd; Crypt::HSXKPasswd->new(dictionary_list => [qw(seme tes words)])'
Alternative signatures must be CODE, HASH, or ARRAY refs at /tmp/p5-type-tiny/lib/Type/Params/Signature.pm line 26.

This exception was added in the linked commit.

DanNixon added a commit to DanNixon/nixpkgs that referenced this issue Jun 12, 2023
Note that because of an upstream issue two module tests fail and
dictionary file functionality does not work in either the library or
`hsxkpasswd` binary.

See:
  - bbusschots/hsxkpasswd#42
  - bbusschots/hsxkpasswd#43
AndersonTorres pushed a commit to NixOS/nixpkgs that referenced this issue Oct 20, 2023
Note that because of an upstream issue two module tests fail and
dictionary file functionality does not work in either the library or
`hsxkpasswd` binary.

See:
  - bbusschots/hsxkpasswd#42
  - bbusschots/hsxkpasswd#43
TheBrainScrambler pushed a commit to TheBrainScrambler/nixpkgs that referenced this issue Dec 23, 2023
Note that because of an upstream issue two module tests fail and
dictionary file functionality does not work in either the library or
`hsxkpasswd` binary.

See:
  - bbusschots/hsxkpasswd#42
  - bbusschots/hsxkpasswd#43
@paultcochrane
Copy link
Contributor

See also the discussion in https://rt.cpan.org/Public/Bug/Display.html?id=144672.

It seems that the fix to this issue is to fix the square brackets in the call to multisig in lib/Crypt/HSXKPasswd/Dictionary/Basic.pm as patched by @perlpunk in https://rt.cpan.org/Transaction/Display.html?id=2415456.

paultcochrane added a commit to paultcochrane/hsxkpasswd that referenced this issue Sep 16, 2024
@tobyink and @perlpunk worked out in
https://rt.cpan.org/Public/Bug/Display.html?id=144672 that the closing
square brace in the types check to the `add_words` sub was not in the
correct place.  As mentioned by @tobyink in the RT ticket:

> Versions of Type::Params prior to 2.000000 would not have spotted this mistake

@perlpunk provided the patch which I'm submitting in this commit.

This change makes the test suite pass again and would hence close both
issue bbusschots#42 and issue bbusschots#38.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants