Menu

#17 Perl error message about an empty string

v1.0 (example)
closed-wont-fix
None
5
2015-06-16
2015-04-06
Bram
No

kpcli 2.8 gives me the following message now and then:

Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/bin/kpcli line 1895.

Steps to reproduce:

kpcli:/> show Internet/test1
 Path: /Internet/
Title: test1
Uname: test
 Pass: test
  URL: test
Notes: 
Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/bin/kpcli line 1895.

Using Perl v5.14.2.

Any ideas?

Related

Bugs: #17

Discussion

  • Lester Hightower

    • assigned_to: Lester Hightower
     
  • Lester Hightower

    Could you upload a sample KeePass file that this happens on? Thanks.

     
  • Lester Hightower

    Please also send the output of a vers command; like this:

    kpcli-2.8:/> vers
    VERSIONS

    • kpcli: 2.8
    • Perl: v5.14.2
    • File::KeePass: 2.03
    • Term::ShellUI: 0.92
    • Term::ReadKey: 2.30
    • Term::ReadLine: 1.07
    • Capture::Tiny: 0.22
    • Data::Password: 1.07
    • Sub::Install: 0.926
    • Term::ReadLine::Gnu: 1.20
    • Clipboard: not installed (optional)

    ReadLine being used: Term::ReadLine::Gnu
    Operating system: linux ("Linux Mint 16 Petra")

     
  • Lester Hightower

    Could you upload a sample KeePass file that this happens on?

    Thanks,

    --
    Lester

    On Mon, Apr 6, 2015 at 5:59 PM, Bram bramdd@users.sf.net wrote:


    Status: open
    Group: v1.0 (example)
    Created: Mon Apr 06, 2015 09:59 PM UTC by Bram
    Last Updated: Mon Apr 06, 2015 09:59 PM UTC
    Owner: nobody

    kpcli 2.8 gives me the following message now and then:

    Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/bin/kpcli line 1895.

    Steps to reproduce:

    kpcli:/> show Internet/test1
    Path: /Internet/Title: test1Uname: test
    Pass: test
    URL: testNotes: Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/bin/kpcli line 1895.

    Using Perl v5.14.2.

    Any ideas?

    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/kpcli/bugs/17/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #17

  • Bram

    Bram - 2015-04-07

    Here you are:

    kpcli:/> ver -v
    VERSIONS
    
     * kpcli: 2.8
     * Perl: v5.14.2
     * File::KeePass: 0.03
     * Term::ShellUI: 0.92
     * Term::ReadKey: 2.30
     * Term::ReadLine: 1.07
     * Term::ReadLine::Gnu: 1.20
     * Capture::Tiny: not installed (optional)
     * Clipboard: not installed (optional)
     * Data::Password: not installed (optional)
     * Sub::Install: not installed (optional)
    .
    ReadLine being used: Term::ReadLine::Gnu
    Operating system: linux
    

    Running on:

    Linux mmm 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux
    

    Actually, no need db file required. The steps to reproduce:

    $ kpcli
    .
    KeePass CLI (kpcli) v2.8 is ready for operation.
    Type 'help' for a description of available commands.
    Type 'help <command>' for details on individual commands.
    .
    kpcli:/> saveas test.kdb
    Please provide the master password: *************************
    Retype to verify: *************************
    kpcli:/> new Internet/test
    WARNING: The file has changed on disk since kpcli opened it!
             It may be opened elsewhere. Continue anyway? [y/N]
    Adding new entry to "/Internet"
    Title: test
    Username: test
    Password:                ("g" or "w" to auto-generate, "i" for interactive)
    Retype to verify:
    URL: test
    Notes/Comments (""):
    (end multi-line input with a single "." on a line)
    | .
    Database was modified. Do you want to save it now? [y/N]:
    WARNING: The file has changed on disk since kpcli opened it!
             It may be opened elsewhere. Continue anyway? [y/N]
    Saved to test.kdb
    kpcli:/> show Internet/test
    .
     Path: /Internet/
    Title: test
    Uname: test
     Pass: test
      URL: test
    Notes:
    Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/bin/kpcli line 1895.
    kpcli:/>
    

    Oops... this also triggers a file changed warning!

    It also looks like attaching fails:

    kpcli:/> attach Internet/test
    No files attached.
    Choose: (a)dd/(c)ancel/(F)inish?
    Path to file: /etc/hosts
    Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/bin/kpcli line 3493.
    

    Attaching fails...

    Bests,

    Bram

     
  • Lester Hightower

    I see the problem now. File::KeePass did not introduce support for attachments until much, much later than the version that you are using (v0.03). I should have accounted for that fact in the code, but I failed to. Honestly, File::KeePass v0.03 is so old at this point (December 2010) that I probably should just declare it unsupported by kpcli.

    Later, I may look into patching kpcli to not fail this way with v0.03 of File::KeePass, but for now, if you'll upgrade File::KeePass (preferably to 2.03) then I believe that your problem will go away: http://search.cpan.org/~rhandom/File-KeePass-2.03/

    I would like to hear any reasons why upgrading File::KeePass is difficult for you, if it is.

    Sincerely,

    Lester

     
  • Lester Hightower

    • status: open --> pending-remind
     
  • Bram

    Bram - 2015-04-07

    Ok, the message is gone after upgrading File:Keepass to 2.03. And indeed, attaching files does work now!

    Bram

     
  • Lester Hightower

    • status: pending-remind --> closed-wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB