Bug 14644: unbreak SIP2 terminal login when using telnet transport
commitc68fc8ad3e5069e52b9bd0487faa3094e9eee4cc
authorGalen Charlton <gmc@esilibrary.com>
Tue, 4 Aug 2015 15:59:39 +0000 (4 15:59 +0000)
committerLiz Rea <wizzyrea@gmail.com>
Sun, 23 Aug 2015 21:44:45 +0000 (24 09:44 +1200)
tree9018bffa2ae15d2b7aaf9f3245a04e79c3df15fc
parent79938f2bcc495631992c030022279532ea7ca278
Bug 14644: unbreak SIP2 terminal login when using telnet transport

This patch fixes breakage introduced by the patch for bug 13506
that prevented SIP2 clients from authenticating themselves over
the telnet transport. Attempts to do so would manifest by the
SIPServer backend crashing and the connection getting closed.

To test:

[1] Use the stock SIPServer config, etc/SIPconfig.xml, and ensure
    that the database contains a staff user whose username is 'term1'
    and password is 'term1' that has the circulate permission.
[2] Start SIPServer, telnet to port 8023, and attempt to log in.  The
    connection will be aborted:

    $ telnet localhost 8023
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    login: term1
    password: term1
    Connection closed by foreign host.

[3] Apply the patch and restart SIPSever, then repeat step 2.  This time,
    the login should succeed:

    $ telnet localhost 8023
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    login: term1
    password: term1
    Login OK.  Initiating SIP

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit 3ec8b27185f0c8600bc931c5284a5d73d0a42aac)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
C4/SIP/SIPServer.pm