Koha/C4
David Cook 331af8521b Bug 13779: sessionID declared twice in C4::Auth::checkauth()
The bug is that $sessionID is declared twice in C4::Auth::checkauth().
At the moment, this doesn't actually create a problem, because no
one seems to be using the $sessionID which is returned by checkauth(),
except in the case of opac/external/overdrive/auth.pl which skips
the second declartion as it doesn't require auth.

This patch removes the redefining of the $sessionID variable.

In terms of testing, try logging in with a username and password
and see if it works. The only risk this patch would pose is breaking
auth I would think, since nothing is actually using the return value
from checkauth() for $sessionID.

NOTE:
It was initially defined near the top of the function (~line 791).
I believe the scoping would mean the correct version of $sessionID
would be used in the latter lines for the unset'ing.
I have skimmed code to see if the sessionID return value is used.
I did not test overdrive, as I do not know how. However, this is
the only area, I think this could possibly break. This change makes
sense to me.

QA: Please test overdrive.
opac/external/overdrive/auth.pl only checks if the value is set, so
   this patch might fix/break something there?
opac/svc/overdrive same kind of check.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This is a (tiny) code improvement. Now we consistently return the session
id that is also stored in the returned cookie. (Which can be an 'anon'
session.)
Fact is that Koha almost everywhere ignores the returned session id and
sometimes gets the session from the cookie (obviously). The session id is
also passed to the template by get_template_and_user but never used in
templates.
As mentioned, the two overdrive scripts are the exception. But since both
test on both $user && $sessionID, they will not choke on an anynonomous
session id without userid. So theoretically fine, but not tested.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-09-14 17:27:28 +00:00
..
AuthoritiesMarc
Barcodes
ClassSortRoutine
Creators
External
Form
Heading
ILSDI Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls 2018-08-31 10:44:04 +00:00
Installer Bug 20776: Add Selenium::Remote::Driver to the dependency list 2018-09-07 13:33:18 +00:00
Labels
Linker
Members
OAI
Output
Patroncards Bug 20084: Fix Industrial2of5 and COOP2of5 patron card layouts 2018-07-12 12:39:34 +00:00
Reports Bug 20495: Remove get_saved_report 2018-07-02 12:06:54 +00:00
Search
Serials
SIP Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls 2018-08-31 10:44:04 +00:00
Utils
Accounts.pm Bug 20631: Remove unused RemoveLostItem from C4::Accounts 2018-08-22 12:36:42 +00:00
Acquisition.pm Bug 18639: Add replacementprice field to acquisitions workflow 2018-08-31 12:46:28 +00:00
Auth.pm Bug 13779: sessionID declared twice in C4::Auth::checkauth() 2018-09-14 17:27:28 +00:00
Auth_cas_servers.yaml.sample
Auth_with_cas.pm
Auth_with_ldap.pm Bug 18947: LDAP - do not assume anonymous bind if no user or password 2018-08-20 14:40:13 +00:00
Auth_with_shibboleth.pm Bug 20287: Remove AddMember_Auto 2018-07-18 15:49:49 +00:00
AuthoritiesMarc.pm
BackgroundJob.pm
Barcodes.pm
Biblio.pm
Bookseller.pm
Boolean.pm
Breeding.pm Bug 19436: (QA follow-up) Revert change in _handle_one_result 2018-08-08 20:51:06 +00:00
Budgets.pm Bug 15408: Remove fund's timestamp when cloning a budget 2018-08-22 12:51:52 +00:00
Calendar.pm
Charset.pm
Circulation.pm Bug 21231: BlockReturnofLostItems does not prevent lost items being found 2018-08-30 13:40:31 +00:00
ClassSortRoutine.pm
ClassSource.pm
Context.pm Bug 14302: (follow-up) Remove traces in C4::Search and C4::Context 2018-08-31 11:24:22 +00:00
Contract.pm
CourseReserves.pm
Creators.pm
Debug.pm
Heading.pm
HoldsQueue.pm
HTML5Media.pm
Images.pm
ImportBatch.pm Bug 21183: Replace C4::Items::GetItemnumberFromBarcode calls 2018-08-30 13:40:35 +00:00
ImportExportFramework.pm
InstallAuth.pm Bug 21137: Replace USER_INFO with logged_in_user 2018-08-14 12:43:10 +00:00
Installer.pm Bug 15717: Installer: Step 3 has <br /> showing 2018-08-17 15:55:08 +00:00
ItemCirculationAlertPreference.pm
Items.pm Bug 21201: Remove GetItemnumbersForBiblio 2018-08-31 10:44:10 +00:00
Koha.pm Bug 18322: Add a facet for ccode fields to Zebra 2018-07-18 17:42:48 +00:00
Labels.pm
Languages.pm
Letters.pm
Linker.pm
Log.pm
MarcModificationTemplates.pm Bug 13560: Add an 'Add' option for marc modification templates 2018-07-19 17:22:18 +00:00
Matcher.pm
Members.pm Bug 21068: Remove NorwegianPatronDB related code 2018-08-30 13:40:29 +00:00
Message.pm Bug 19743: Update header and footer on each item for checkin / checkout / renewal notices 2018-08-14 11:55:07 +00:00
NewsChannels.pm
Output.pm Bug 20661: (QA follow-up) Add POD for output_and_exit 2018-08-10 12:23:03 +00:00
Overdues.pm Bug 21207: Remove unused RM C4::Overdues::GetItems sub 2018-08-30 13:40:37 +00:00
Patroncards.pm
Print.pm
Record.pm Bug 20272: Changes for Breeding.pm and Record.pm 2018-07-02 12:12:49 +00:00
Reports.pm
Reserves.pm Bug 7534: (RM follow-up) Fix tests and adjust after bug 15524 2018-09-06 17:32:26 +00:00
Ris.pm
RotatingCollections.pm
Scheduler.pm
Scrubber.pm
Search.pm Bug 14302: (follow-up) Remove traces in C4::Search and C4::Context 2018-08-31 11:24:22 +00:00
Serials.pm Bug 21154: Remove unused subs from C4::Serials 2018-08-09 10:42:38 +00:00
Service.pm
ShelfBrowser.pm
SMS.pm
SocialData.pm
Stats.pm
Suggestions.pm
Tags.pm
Templates.pm
TmplToken.pm
TmplTokenType.pm
TTParser.pm
UsageStats.pm Bug 21226: Remove xISBN services 2018-08-16 13:20:22 +00:00
XISBN.pm Bug 21235: Remove table services_throttle 2018-09-07 15:09:39 +00:00
XSLT.pm