[Bug 16401] New: System preference staffClientBaseURL hardcoded to 'http' in svc / import_bib
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Bug ID: 16401 Summary: System preference staffClientBaseURL hardcoded to 'http' in svc / import_bib Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: z.tajoli@cineca.it QA Contact: testopia@bugs.koha-community.org In many points now, in particular in CAS authentication, we use the system preference staffClientBaseURL as OPACBaseURL. The preference should be a complete URL, starting with http:// or https://. So we need to change svc/import_bib line 101. From my $url = 'http://'. C4::Context->preference('staffClientBaseURL') .'/cgi-bin/koha/catalogue/detail.pl?biblionumber='. $biblionumber; To my $url = C4::Context->preference('staffClientBaseURL') .'/cgi-bin/koha/catalogue/detail.pl?biblionumber='. $biblionumber; It is probably a good idea to change also koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref. Like OPACBaseURL: " . This should be a complete URL, starting with http:// or https://. Do not include a trailing slash in the URL. (This must be filled in correctly for CAS, svc, and load_testing to work.) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|System preference |System preference |staffClientBaseURL |staffClientBaseURL |hardcoded to 'http' in svc |hardcoded to 'http://' in |/ import_bib |svc / import_bib -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=12027 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Summary|System preference |System preference |staffClientBaseURL |staffClientBaseURL |hardcoded to 'http://' in |hardcoded to 'http://' |svc / import_bib | CC| |josef.moravec@gmail.com Assignee|koha-bugs@lists.koha-commun |josef.moravec@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #1 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 66025 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66025&action=edit Bug 16401: System preference staffClientBaseURL hardcoded to 'http://' Test plan: 1) Insert some value to staffBaseURL preference, without starting http:// 2) Apply the patch 3) Update database 4) Go to system preferences adminsitration, find the staffBaseURL preference, the inserted value should be prepended with 'http://' and the comment should be "This should be a complete URL, starting with http:// or https://. Do not include a trailing slash in the URL. (This must be filled in correctly for CAS, svc, and load_testing to work.)" 5) prove t/db_dependent/Auth_with_cas.t 6) prove t/db_dependent/selenium/basic_workflow.t 7) prove t/db_dependent/check_sysprefs.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Glad to see this patch - When using CAS for example it's already required that you add https:// in order to make things work right. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66025|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 66143 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66143&action=edit [SIGNED OFF] Bug 16401: System preference staffClientBaseURL hardcoded to 'http://' Test plan: 1) Insert some value to staffBaseURL preference, without starting http:// 2) Apply the patch 3) Update database 4) Go to system preferences adminsitration, find the staffBaseURL preference, the inserted value should be prepended with 'http://' and the comment should be "This should be a complete URL, starting with http:// or https://. Do not include a trailing slash in the URL. (This must be filled in correctly for CAS, svc, and load_testing to work.)" 5) prove t/db_dependent/Auth_with_cas.t 6) prove t/db_dependent/selenium/basic_workflow.t 7) prove t/db_dependent/check_sysprefs.t Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66143|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 66712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66712&action=edit Bug 16401: System preference staffClientBaseURL hardcoded to 'http://' Test plan: 1) Insert some value to staffBaseURL preference, without starting http:// 2) Apply the patch 3) Update database 4) Go to system preferences adminsitration, find the staffBaseURL preference, the inserted value should be prepended with 'http://' and the comment should be "This should be a complete URL, starting with http:// or https://. Do not include a trailing slash in the URL. (This must be filled in correctly for CAS, svc, and load_testing to work.)" 5) prove t/db_dependent/Auth_with_cas.t 6) prove t/db_dependent/selenium/basic_workflow.t 7) prove t/db_dependent/check_sysprefs.t Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- What about the following query instead? UPDATE systempreferences SET value = CONCAT('http://', value) WHERE variable = 'staffClientBaseURL' AND value <> "" AND value NOT LIKE '^http%'; staffClientBaseURL is not supposed to be empty, but it will avoid to have it set to "http://" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66712|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 67268 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67268&action=edit Bug 16401: System preference staffClientBaseURL hardcoded to 'http://' Test plan: 1) Insert some value to staffBaseURL preference, without starting http:// 2) Apply the patch 3) Update database 4) Go to system preferences adminsitration, find the staffBaseURL preference, the inserted value should be prepended with 'http://' and the comment should be "This should be a complete URL, starting with http:// or https://. Do not include a trailing slash in the URL. (This must be filled in correctly for CAS, svc, and load_testing to work.)" 5) prove t/db_dependent/Auth_with_cas.t 6) prove t/db_dependent/selenium/basic_workflow.t 7) prove t/db_dependent/check_sysprefs.t Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 67269 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67269&action=edit Bug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference Adds a condition to check that the staffClientBaseUrl is not empty before updating it with 'http://'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67268|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67269|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 67270 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67270&action=edit Bug 16401: System preference staffClientBaseURL hardcoded to 'http://' Test plan: 1) Insert some value to staffBaseURL preference, without starting http:// 2) Apply the patch 3) Update database 4) Go to system preferences adminsitration, find the staffBaseURL preference, the inserted value should be prepended with 'http://' and the comment should be "This should be a complete URL, starting with http:// or https://. Do not include a trailing slash in the URL. (This must be filled in correctly for CAS, svc, and load_testing to work.)" 5) prove t/db_dependent/Auth_with_cas.t 6) prove t/db_dependent/selenium/basic_workflow.t 7) prove t/db_dependent/check_sysprefs.t Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 67271 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67271&action=edit Bug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference Adds a condition to check that the staffClientBaseUrl is not empty before updating it with 'http://'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I like Jonathan's idea and have written a follow-up for it. The change is tiny, so pushing it back to QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- C4::Context has a OPACBaseURL change to make sure a protocol is prepended. Probably should do something similar for staffBaseUrl. Also, are there any letters/noticed which might be affected? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I don't see how this change would affect notices or letters. When I tested this initially I checked all occurrences of the preference had been taken into account. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67270|0 |1 is obsolete| | Attachment #67271|0 |1 is obsolete| | --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 67918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67918&action=edit Bug 16401: System preference staffClientBaseURL hardcoded to 'http://' Test plan: 1) Insert some value to staffBaseURL preference, without starting http:// 2) Apply the patch 3) Update database 4) Go to system preferences adminsitration, find the staffBaseURL preference, the inserted value should be prepended with 'http://' and the comment should be "This should be a complete URL, starting with http:// or https://. Do not include a trailing slash in the URL. (This must be filled in correctly for CAS, svc, and load_testing to work.)" 5) prove t/db_dependent/Auth_with_cas.t 6) prove t/db_dependent/selenium/basic_workflow.t 7) prove t/db_dependent/check_sysprefs.t Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 67919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67919&action=edit Bug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference Adds a condition to check that the staffClientBaseUrl is not empty before updating it with 'http://'. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Katrin Fischer from comment #12)
I don't see how this change would affect notices or letters. When I tested this initially I checked all occurrences of the preference had been taken into account.
Are there any letters with something like <<staffClientBaseURL>>? Because OPACBaseURL had some with http:// in front for some letters/notices. I vaguely remember checking and not finding anything, but that is how. So Passed QA is fine with me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to M. Tompsett from comment #15)
(In reply to Katrin Fischer from comment #12) Are there any letters with something like <<staffClientBaseURL>>?
I didn't see anything in my check, doesn't mean a library isn't using it in their custom notices, but I think it is a minor local adjustment if needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 67967 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67967&action=edit Bug 16401: Add a warning if letter.content matches staffClientBaseURL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16401 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12027 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12027 [Bug 12027] Shibboleth authentication for staff client -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org