Bug 31971 - SIP server rejects passwords ending in non-alphanumeric characters
Summary: SIP server rejects passwords ending in non-alphanumeric characters
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-25 12:19 UTC by Nick Clemens (kidclamp)
Modified: 2022-10-25 12:19 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2022-10-25 12:19:00 UTC
To recreate:
1 - Set a patron's password to secret*
2 - Attempt a patron information request via the sip clip emulator:
    perl misc/sip_cli_emulator.pl -su term1 -sp term1 -l CPL -a localhost -p 6001 -m patron_information --patron ballard --password secret*
3 - It fails?
4 - Set password to secret*s
5 - Repeat
    perl misc/sip_cli_emulator.pl -su term1 -sp term1 -l CPL -a localhost -p 6001 -m patron_information --patron ballard --password secret*s
6 - It succeeeds

Offending line(s) appears to be:
366           $buffer =~ s/^\s*[^A-z0-9]+//s;
367 # Every line must start with a "real" character.  Not whitespace, control chars, etc.
368           $buffer =~ s/[^A-z0-9]+$//s;
369 
370 # Same for the end.  Note this catches the problem some clients have sending empty fields at the end, like |||