Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-SSH2 CPAN distribution.

Report information
The Basics
Id:
80065
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
cmadams [...] hiwaay.net
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Wrong precedence in version test in Net::SSH2
Date: Mon, 8 Oct 2012 17:34:49 -0500
To: bug-Net-SSH2@rt.cpan.org
From: Chris Adams <cmadams@hiwaay.net>
When testing the libssh2 version, the operator precedence is wrong (because >= has higher precedence than ||), which leads to the test always succeeding. Here's the fix: --- Net-SSH2-0.45.dist/lib/Net/SSH2.pm 2012-05-27 04:18:25.000000000 -0500 +++ Net-SSH2-0.45.dist/lib/Net/SSH2.pm 2012-10-08 09:56:41.205788483 -0500 @@ -279,7 +279,7 @@ sub _auth_methods { return { - ((version())[1]||0 >= 0x010203 ? ( + (((version())[1]||0) >= 0x010203 ? ( 'agent' => { ssh => 'agent', method => \&auth_agent, @@ -322,7 +322,7 @@ sub _auth_rank { return [ - ((version())[1]||0 >= 0x010203 ? ('agent') : ()), + (((version())[1]||0) >= 0x010203 ? ('agent') : ()), qw(hostbased publickey keyboard keyboard-auto password none) ]; } -- Chris Adams <cmadams@hiwaay.net> Systems and Network Administrator - HiWAAY Internet Services I don't speak for anybody but myself - that's enough trouble.
Hey, in the development version that ugly code was rewritten and the issue just went away. Anyway, thank you for reporting it and for the patch!


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.