Skip Menu |

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

Report information
The Basics
Id: 45265
Status: resolved
Priority: 0/
Queue: Net-Appliance-Session

People
Owner: OLIVER [...] cpan.org
Requestors: erik-bitcard [...] planeterik.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.36
Fixed in: (no value)



Subject: Login with User Name / Password on PIXOS uses "enable" instead of "login"
Pretty straightforward. If I create an object like this: $conn->connect(Name => $Locations{$lo}{firewall}{'user name'}, Password => $Locations{$lo}{firewall}{'password'}) or die "FATAL - username / password invalid for firewall at location $lo.\n"; then use the begin_privileged method with two parameters like this: $conn->begin_privileged($UserName, $Password); I get the following session: Type help or '?' for a list of available commands. Show quoted text
firewall> enable
Password: ************** Invalid password Password: It should be using the "login" command instead of the "enable" command.
From: erik-bitcard [...] planeterik.com
On viewing the source code, I see the problem: It assumes that if the password you use to enter privileged mode is the same as your login password, then it needs to force the use of the Enable command. The module also assumes that it needs to use the disable command when closing the connection, which we have to override with the in_privileged_mode method. I suppose there's some circumstances that require this functionality, but it seems to me that a better method might be to just assume the user knows what they're doing. It actually happens occasionally :-)