[Koha-bugs] [Bug 15006] Need to distinguish client timeout from login timeout

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 13 02:55:37 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15006

Srdjan Jankovic <srdjan at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #53132|0                           |1
        is obsolete|                            |

--- Comment #67 from Srdjan Jankovic <srdjan at catalyst.net.nz> ---
Created attachment 53355
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53355&action=edit
[SIGNED-OFF] Bug 15006 Drop raw connection if login fails

raw_connection was not behaving correctly if an invalid string was
passed or a login failed.
It was not checking that the login succeeded ( it checked that account
existed not that it contained data and it existed even if login failed)
and so failed logins instead of aborting immediately fell through into
the sip_protocol_loop, forcing that to timeout invalid connections.
It now checks that account has id set and returns if not.

The timeout alarm is now set on the while loop, in normal running this
should not be triggered as the socket is opened and the first data
should be a login message and the while loop should only iterate once,
but lets not go into an infinite loop due to unforeseen circumstances.

I have reindented the routine as the flow was not clear (the while was
not indented at all.

Also if using Net::Server::PreFork when a new connection comes in you
may be handed the the successful login parameters from a preceding call.
Because of this you could successfully transmit transactions and Koha
would carry them out without having received a valid login ( and
possibly with the wrong account details!) We now delete any existing
account for new connections.

NB: This patch requires that the patch for bug 13807 has been applied
Signed-off-by: Srdjan <srdjan at catalyst.net.nz>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list