Bug 14644 - SIP2 terminal authentication via telnet transport broken
Summary: SIP2 terminal authentication via telnet transport broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: master
Hardware: All All
: P5 - low critical (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Whiteboard:
Keywords: regression
Depends on: 13506
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-04 15:42 UTC by Galen Charlton
Modified: 2016-12-05 21:23 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14644: unbreak SIP2 terminal login when using telnet transport (1.95 KB, patch)
2015-08-04 16:08 UTC, Galen Charlton
Details | Diff | Splinter Review
Signed Off patch (2.01 KB, patch)
2015-08-05 09:12 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 14644: unbreak SIP2 terminal login when using telnet transport (2.08 KB, patch)
2015-08-19 10:56 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Galen Charlton 2015-08-04 15:42:05 UTC
The removal of C4::SIP::Sip::Configuration::* in bug 13506 did not reach all of the code that was using those classes.  In particular, the telnet transport expects to compare the password supplied by the client with the password in the SIP configuration, and at the moment attempts to use the object method ->password() that was previously supplied by C4::SIP::Sip::Configuration::Account.

Since that method no longer exists, what happens is that the SIPServer backend crashes and aborts the connection if the client attempts to log in via the telnet transport.
Comment 1 Galen Charlton 2015-08-04 16:08:59 UTC Comment hidden (obsolete)
Comment 2 Colin Campbell 2015-08-05 09:12:55 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-08-19 10:56:17 UTC
Created attachment 41657 [details] [review]
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>
Comment 4 Jonathan Druart 2015-08-19 10:57:56 UTC
Should be backported to 3.20.x.
Comment 5 Tomás Cohen Arazi 2015-08-20 16:46:31 UTC
Patch pushed to master.

Thanks Galen!
Comment 6 Chris Cormack 2015-08-23 06:12:00 UTC
Pushed to 3.20.x will be in 3.20.3