[Bug 36177] New: We need selenium tests to cover csrf checks
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Bug ID: 36177 Summary: We need selenium tests to cover csrf checks Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 36148 will be adding a check in our middleware for csrf coverage on post operations - we need selenium tests to cover all scenarios -- 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=36177 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36148 -- 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=36177 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |critical CC| |jonathan.druart+koha@gmail. | |com Keywords| |rel_24_05_candidate -- 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=36177 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com Status|NEW |ASSIGNED -- 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=36177 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|We need selenium tests to |We need integration tests |cover csrf checks |to cover csrf checks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 162532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162532&action=edit Bug 36177: Cypress tests - yarn add cypress-mysql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 162533 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162533&action=edit Bug 36177: Cypress tests - cypress-mysql config -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 162534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162534&action=edit Bug 36177: Add Cypress tests This should not be pushed, we are not ready on jenkins. csrf.ts must be run within ktd (not on the host, or 'db' must resolve) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Tomas, can you help here? 'db' needs to be resolved from the container. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #4)
Tomas, can you help here? 'db' needs to be resolved from the container.
'db' is resolved inside the container, so we should be fine. That said... cannot we ship some template instead, and have a helper script that picks env variables and does what is needed instead? Having that also for the baseUrl and friends would also make it easier for running Cypress on the sandboxes, etc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162534|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 162576 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162576&action=edit Bug 36177: Add Cypress tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #5)
(In reply to Jonathan Druart from comment #4)
Tomas, can you help here? 'db' needs to be resolved from the container.
'db' is resolved inside the container, so we should be fine.
Indeed, the tests are passing inside the container. No idea what changed since I wrote them.
That said... cannot we ship some template instead, and have a helper script that picks env variables and does what is needed instead? Having that also for the baseUrl and friends would also make it easier for running Cypress on the sandboxes, etc.
Yes, maybe. Feel free to open a new bug and provide a patch. I don't see it as an important need right now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Jonathan Druart <jonathan.druart+koha@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=36177 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162532|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 162984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162984&action=edit Bug 36177: Cypress tests - yarn add cypress-mysql Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162533|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 162985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162985&action=edit Bug 36177: Cypress tests - cypress-mysql config Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162576|0 |1 is obsolete| | --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 162986 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162986&action=edit Bug 36177: Add Cypress tests Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #11 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Ran cypress tests before applying the patches: perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only 2. Ran the tests again after patches applied (I think I did a yarn there as well to add the new module/package, but I did a reset_all and shut down KTD and restarted as well - not sure of the correct way to do this). Results after patches applied: Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✔ InfiniteScrollSelect_spec.ts 00:14 4 4 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ KohaTable_spec.ts 00:03 1 1 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ Auth/csrf.ts 00:18 6 6 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/Agreements_spec.ts 00:31 5 5 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/DataProviders_spec.ts 00:49 13 13 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/Dialog_spec.ts 00:11 4 4 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/Licenses_spec.ts 00:21 5 5 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/Packages_spec.ts 00:22 5 5 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/Searchbar_spec.ts 00:11 4 4 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/Titles_spec.ts 00:34 6 6 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/UsageReports_spec.ts 00:42 13 13 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ ERM/UserRoles_spec.ts 00:03 1 1 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ Preservation/Settings.ts 00:15 5 5 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ Preservation/Trains.ts 00:20 8 8 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ Preservation/WaitingList.ts 00:08 3 3 - - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✔ All specs passed! 05:09 83 83 - - - Done in 349.96s. all good Running [koha-shell kohadev -c "touch testing.success"]... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|We need integration tests |We need integration tests |to cover csrf checks |to cover CSRF checks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 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=36177 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162984|0 |1 is obsolete| | Attachment #162985|0 |1 is obsolete| | Attachment #162986|0 |1 is obsolete| | --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 163035 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163035&action=edit Bug 36177: Cypress tests - yarn add cypress-mysql Signed-off-by: David Nind <david@davidnind.com> 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=36177 --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 163036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163036&action=edit Bug 36177: Cypress tests - cypress-mysql config Signed-off-by: David Nind <david@davidnind.com> 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=36177 --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 163037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163037&action=edit Bug 36177: Add Cypress tests Signed-off-by: David Nind <david@davidnind.com> 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=36177 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 36148 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36355 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36355 [Bug 36355] Auth/csrf.ts is failing if library with long info in the DB -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Bug 36177 depends on bug 36148, which changed state. Bug 36148 Summary: Move CSRF check code outside of CGI->new https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36148 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36177 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org