Bug 19977 - Local Use tab in systempreferences tries to open text editor's temporary files, and die
Summary: Local Use tab in systempreferences tries to open text editor's temporary file...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Julian Maurice
QA Contact: Nick Clemens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-16 09:19 UTC by Julian Maurice
Modified: 2018-06-04 20:15 UTC (History)
4 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 19977: Open only .pref files in Local Use tab (sysprefs) (1.06 KB, patch)
2018-01-16 09:23 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 19977: Open only .pref files in Local Use tab (sysprefs) (1.11 KB, patch)
2018-01-18 17:54 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 19977: Open only .pref files in Local Use tab (sysprefs) (1.16 KB, patch)
2018-01-19 14:54 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2018-01-16 09:19:26 UTC
Steps to reproduce:
1. Open koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref with vim (check that it creates a .circulation.pref.swp in the same directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Observe the error: Can't use string ("b0VIM 8.0") as a HASH ref while "strict refs" in use at /home/koha/koha/admin/systempreferences.pl line 413.
Comment 1 Julian Maurice 2018-01-16 09:23:53 UTC
Created attachment 70548 [details] [review]
Bug 19977: Open only .pref files in Local Use tab (sysprefs)

Test plan:
1. Open .../prog/en/modules/admin/preferences/circulation.pref
with vim (check that it creates a .circulation.pref.swp in the same
directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Confirm that the page works normally
Comment 2 M. Tompsett 2018-01-18 17:48:47 UTC
One would hope this case never happens. And if it does, stop editing the files on a live system. That being said, this is a straight-forward regexp tightening.
Comment 3 M. Tompsett 2018-01-18 17:54:24 UTC
Created attachment 70703 [details] [review]
Bug 19977: Open only .pref files in Local Use tab (sysprefs)

Test plan:
1. Open .../prog/en/modules/admin/preferences/circulation.pref
with vim (check that it creates a .circulation.pref.swp in the same
directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Confirm that the page works normally

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 4 Julian Maurice 2018-01-19 11:03:04 UTC
(In reply to M. Tompsett from comment #2)
> One would hope this case never happens. And if it does, stop editing the
> files on a live system. That being said, this is a straight-forward regexp
> tightening.

Of course this should never happen in production, but it can be annoying during development.
Thanks for the sign-off!
Comment 5 Nick Clemens 2018-01-19 14:54:01 UTC
Created attachment 70749 [details] [review]
Bug 19977: Open only .pref files in Local Use tab (sysprefs)

Test plan:
1. Open .../prog/en/modules/admin/preferences/circulation.pref
with vim (check that it creates a .circulation.pref.swp in the same
directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Confirm that the page works normally

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2018-01-19 18:56:36 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens 2018-01-23 04:11:20 UTC
Awesome work all!

Pushed to Stable for 17.11.02
Comment 8 Fridolin SOMERS 2018-01-31 07:55:54 UTC
Pushed to 17.05.x for v17.05.09