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

--- Comment #1 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 207975
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207975&action=edit
Bug 43805: Don't rewrite requests for the .pl script of Vue pages

The rewrite rules for admin/record_sources and admin/circulation_triggers
match any URL starting with the page name, so they also match the real
script, /cgi-bin/koha/admin/record_sources.pl, and turn it into
record_sources.pl.pl, which does not exist.

This is normally invisible because the Vue pages are reached without the
extension. It breaks when a session times out: the login form posts back
to the .pl URL, and the user gets a 404 instead of landing on the page
they were on.

Skip the rewrite when the request is already for the .pl script, as is
already done for the preservation and ill rules.

Test plan:
1. Without the patch, as a logged in staff user, visit
   /cgi-bin/koha/admin/record_sources.pl and
   /cgi-bin/koha/admin/circulation_triggers.pl
   => 404 for both.
2. Apply the patch and restart Apache (restart_all in KTD, or reload the
   apache config after regenerating it on a package install).
3. Visit the same two URLs again
   => The pages load.
4. Visit /cgi-bin/koha/admin/record_sources,
   /cgi-bin/koha/admin/record_sources/add and
   /cgi-bin/koha/admin/circulation_triggers
   => They still load, and the Vue router still works within them.
5. Open /cgi-bin/koha/admin/record_sources, then in another tab log out.
   Back in the first tab, reload the page, log in again
   => You land on the record sources page, not a 404.
6. Repeat step 5 for /cgi-bin/koha/admin/circulation_triggers.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to