Commit graph

147 commits

Author SHA1 Message Date
Mirko Tietgen
f9e06c3849 Bug 20693: Plack fails, because 'libcgi-emulate-psgi-perl' package is not installed
Add CGI::Emulate::PSGI to PerlDependencies.pm

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-15 14:59:37 -03:00
17e8acad70 Bug 20624: Net::OAuth2::AuthorizationServer is not a hard dependency
While we get packaging sorted, Net::OAuth2::AuthorizationServer is not a
hard dependency for Koha and the feature requiring it is disabled by
default.

This patch:
- Makes the dependency optional
- Makes the unit tests for the OAuth2 client credentials flow skip if
  the dependency is not met.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-09 12:56:03 -03:00
Julian Maurice
5c7d12e4e0 Bug 20402: Remove dependency on Mojo::Plugin::OAuth2::Server
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-08 15:55:42 -03:00
Julian Maurice
43a4b3c22c Bug 20402: Implement OAuth2 authentication for REST API
It implements only the "client credentials" flow with no scopes
support. API clients are tied to an existing patron and have the same
permissions as the patron they are tied to.
API Clients are defined in $KOHA_CONF.

Test plan:
0. Install Net::OAuth2::AuthorizationServer 0.16
1. In $KOHA_CONF, add an <api_client> element under <config>:
     <api_client>
       <client_id>$CLIENT_ID</client_id>
       <client_secret>$CLIENT_SECRET</client_secret>
       <patron_id>X</patron_id> <!-- X is an existing borrowernumber -->
     </api_client>
2. Apply patch, run updatedatabase.pl and reload starman
3. Install Firefox extension RESTer [1]
4. In RESTer, go to "Authorization" tab and create a new OAuth2
   configuration:
   - OAuth flow: Client credentials
   - Access Token Request Method: POST
   - Access Token Request Endpoint: http://$KOHA_URL/api/v1/oauth/token
   - Access Token Request Client Authentication: Credentials in request
     body
   - Client ID: $CLIENT_ID
   - Client Secret: $CLIENT_SECRET
5. Click on the newly created configuration to generate a new token
   (which will be valid only for an hour)
6. In RESTer, set HTTP method to GET and url to
   http://$KOHA_URL/api/v1/patrons then click on SEND
   If patron X has permission 'borrowers', it should return 200 OK
   with the list of patrons
   Otherwise it should return 403 with the list of required permissions
   (Please test both cases)
7. Wait an hour (or run the following SQL query:
   UPDATE oauth_access_tokens SET expires = 0) and repeat step 6.
   You should have a 403 Forbidden status, and the token must have been
   removed from the database.
8. Create a bunch of tokens using RESTer, make some of them expires
   using the previous SQL query, and run the following command:
     misc/cronjobs/cleanup_database.pl --oauth-tokens
   Verify that expired tokens were removed, and that the others are
   still there
9. prove t/db_dependent/api/v1/oauth.t

[1] https://addons.mozilla.org/en-US/firefox/addon/rester/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-08 15:55:42 -03:00
Mark Tompsett
6d59eee2ba Bug 20103: Readonly::XS is completely bogus post perl 5.8
A ha! Lie about who we are, and the module will return a version.

./koha_perl_deps.pl -a
-- before patch Readonly::XS is 0
-- after patch it has a version number.
run koha qa test tools

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 13:26:49 -03:00
d6f3e1fbe6 Bug 18342: Mark Cache::Memcached as mandatory
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 12:47:07 -03:00
aaea465942 Bug 20191: (QA follow-up) Require Jessie's Test::MockTime
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-05 10:10:04 -03:00
Mark Tompsett
b76ad51b9d Bug 20191: Use Test::MockTime to hold time still
The problem is the calls to HTTP::OAI::Header, etc.
may reference gmtime which is continually changing by
the second. By forcing time to lock for all the tests,
except the last one, we can be assured things should
not fail.

TEST PLAN
---------
install libtest-mocktime-perl
apply the patch
restart_all
in kshell, prove t/db_dependent/OAI/Server.t
run koha qa test tools

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-05 10:09:04 -03:00
e2869cb014 Bug 18055: The 2 new deps are used for testing purpose
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-28 15:54:56 -03:00
ac38492107 Bug 18055: Speed up '00-strict.t' test, with Parallel::ForkManager
to test...

1/ run 00-strict.t test, (16.5 mins on a 4xcpu system)

$ time prove t/db_dependent/00-strict.t
...
Files=1, Tests=654, 994 wallclock secs ( 0.19 usr  0.04 sys + 873.40 cusr 116.20 csys = 989.83 CPU)
Result: PASS
real    16m34.104s

2/ apply patch

3/ install Parallel::ForkManager package
$ sudo apt-get install libparallel-forkmanager-perl libsys-cpu-perl

4/ run 00-strict.t test again, (now 6 mins.. much faster)

$ time prove t/db_dependent/00-strict.t
...
Files=1, Tests=654, 364 wallclock secs ( 0.07 usr  0.01 sys + 1159.20 cusr 153.41 csys = 1312.69 CPU)
Result: PASS
real    6m4.355s

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Edit: removed debian/control changes as the file is generated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-28 15:53:05 -03:00
Mirko Tietgen
78cd06a0f6 Bug 20061: koha-common is not pulling libsearch-elasticsearch-perl
Adds Search::Elasticsearch to Perldependencies.pm

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-23 10:49:42 -03:00
Srdjan
79c2848b14 Bug 19450: Fixed WebService::ILS bug upstream (0.17)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-21 13:09:17 -03:00
db68a2f432 Bug 18993: Allow Test::More version 1.302073
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-07 10:09:51 -03:00
8e61e6ee2c Bug 18993: Bump Test::More to 1.302075
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-07 10:09:51 -03:00
Lari Taskula
47b6026c6a Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies
Edit (tcohen): I've changed the version numbers to match those Mirko has already
successfully packaged and are known to work for this patchset.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-09-21 11:27:05 -03:00
a900a434d5 Bug 17190 - Marked REST API as mandatory (require = 1) in PerlDependencies.pm
For testing I went in Staff client to Home > About Koha > tab  Perl modules
and verified that both Mojolicious (6.0) and Swagger2 (0.59) are marked
as mandatory.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-05-08 09:06:30 -04:00
508147d244 Bug 18373: Re-add UpgradeBackup.pm
Bug 18028 removed the install_misc directory but
install_misc/UpgradeBackup.pm was still used by the 'upgrade' rule of
make.

Other files from install_misc were useless to it may be better not to
reintroduce this directory with only 1 file.

Test plan:
`make`
`sudo make install`
`make upgrade`

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-04-14 10:41:03 -04:00
5d6ee0c7a0 Bug 17828: (followup) Add Test::Exception as dependency
Test::Exception is available on Jessie and already installed when
koha-common gets installed

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-03-31 14:36:48 +00:00
Srdjan
e7aff8ea0d Bug 16034 follow-up: added WebService::ILS to PerlDependencies
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-02-21 19:58:21 +00:00
2b9662e0ca Bug 17990: Refactor Perl module versions check
The code is duplicated, variable are not set ($_), code is hard to read,
not covered by tests and the subroutine has 2 completely different
behaviors depending on the presence of the "module" parameter.
No need more ti rewrite it.

Test plan:
- Use koha_perl_deps.pl with the different options (-u -m -a -i)
- Go on the about page, "Perl modules" tab

You should not see any differences from before and after this patch

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-02-17 12:13:44 +00:00
4ff78a9a0d Bug 17986: Perl dependency evaluation incorrect
It looks like I made a copy/paste error in a previous patch.

While the fix was working when you pass the param "module" to
version_info, it wasn't populating the version correctly
for the "all" param, which causes koha_perl_deps.pl to
think all OK modules actually need an upgrade.

TEST PLAN

0) Be on a system where you know your Koha Perl dependencies are
mostly up-to-date

1) Run ./koha_perl_deps.pl -a -c
2) Note that most modules say they need an upgrade even when
the installed version is the same as the minimum version

3) Apply patch

4) Run ./koha_perl_deps.pl -a -c
5) Note that most moduls say they're OK, especially when the
installed version is the same or greater than the minimum version

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Running koha_perl_deps.pl -u convinced me.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-30 11:18:27 +00:00
b732963e2f Bug 17880 - Use version.pm to parse version numbers in C4::Installer::PerlModules
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-20 13:47:27 +00:00
6b67f635b1 Bug 17666: [QA Follow-up] Mark File::Slurp as required
Not optional since we are 'using' it in updatedatabase.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-12-16 11:14:49 +00:00
c9e95aa22e Bug 17666: Revert "Bug 16685 [QA Followup] - Use Path::Tiny::slurp instead of File::Slurp"
This reverts commit 7ac1bc3537.

On a kohadevbox:
Error flock (1) on
'/home/vagrant/kohaclone/installer/data/mysql/atomicupdate/bug_xxxx.perl':
No locks available at installer/data/mysql/updatedatabase.pl line 13637.

This is because Path::Tiny->slurp[_utf8] uses flocks which does not work
with NFS

Test plan:
Execute a .perl atomic update file on a kohadevbox
=> Without this patch you should get the flock error
=> With this patch the update should work fine

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-12-16 11:14:49 +00:00
68ced964fd Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher
This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match
of ISSNs with or without hyphens. It uses Business::ISSN in order to
follow the use of Business::ISBN and allow for validation of ISSNs

To test:
1 - Find a record in your system with an ISSN (or add one)
2 - Stage a record containing the same ISSN but lacking a hyphen
3 - Matching on ISSN should find 0 matches
4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import
5 - Matching should find 0
6 - Apply patch
7 - Update datbase and install Business::ISSN
8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no
change
9 - Set AggressiveMatchOnISSN as do and repeat original test
10 - You should find a match
11 - prove t/Koha.t - all tests pass

Sponsored by North Central Regional Library System (NCRL) www.ncrl.org

Signed-off-by: Chad Roseburg <croseburg@ncrl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:58:14 +00:00
60fc63ef4d Bug 17425: Add Try::Tiny dependency
This patch just introduces Try::Tiny as a core Koha dependency.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 17:37:54 +00:00
7ac1bc3537 Bug 16685 [QA Followup] - Use Path::Tiny::slurp instead of File::Slurp
Path::Tiny::slurp is considered better to use than File::Slurp.

RM Note: The package version in wheezy is too old, the package version
         in jessie is just fine and should be added to the community
         repo if wheezy will be supported for the coming release.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 12:53:07 +00:00
2be60d395f Bug 17223: Add Cache::Memcached to PerlDependencies
Test plan:
Check about page, perl modules.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-02 13:58:04 +00:00
86144a65e0 Bug 16929: [QA Follow-up] Add dependency for Bytes::Random::Secure
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Marc <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-10 13:26:00 +00:00
Mirko Tietgen
893f6cc263 Bug 17087 - Set Test::WWW::Mechanize version to 1.42
This was set to a version that is not available in Wheezy or Jessie.
The version is not required, the only change to 1.42 (packaged for
Wheezy and Jessie) is a fix for Windows, see
http://cpansearch.perl.org/src/PETDANCE/Test-WWW-Mechanize-1.44/Changes

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-10 13:23:43 +00:00
Mirko Tietgen
3c9eace41a Bug 17043 - Readonly deps
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-08 14:26:34 +00:00
92626f55c8 Bug 16971: Missing dependency for HTML::Entities
This module is already used in opac-password-recovery.pl.
It is loaded in Acquisition, but not used (anymore?).
It is not yet listed in PerlDependencies.

Note: The module is packaged for Debian Wheezy and Jessie.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-08-04 19:44:03 +00:00
c6d3e5a50b Bug 16715: Use Sereal::Decoder and Sereal::Encoder instead of Sereal
Sereal is not packaged for jessie, so let's use Sereal::Encoder and
Sereal::Decoder instead.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-02 14:29:02 +00:00
Jesse Weaver
66a8c96550 Bug 16715: Proposed followup to use Sereal for serialization
This manages to eke out a bit more performance on my machine.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-22 17:17:28 +00:00
67e6efab5d Bug 16770: Remove Memoize::Memcached dependency
This module is no longer in use and can be removed.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>

This part involves some changes in a bunch of mysterious debian|ubuntu
related files, not quite sure if I know what I'm doing
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 14:05:56 +00:00
779fa7c6da Bug 16591: Fix CSRF in opac-memberentry
If an attacker can get an authenticated Koha user to visit their page
with the code below, they can update the victim's details to arbitrary
values.

Test plan:

Trigger
/cgi-bin/koha/opac-memberentry.pl?action=update&borrower_B_city=HACKED&borrower_firstname=KOHA&borrower_surname=test

=> Without this patch, the update will be done (or modification
request)
=> With this patch applied you will get a crash "Wrong CSRF token" (no
need to stylish)

Do some regression tests with this patch applied (Update patron infos)

QA note: I am not sure it's useful to create a digest of the DB pass,
but just in case...

Reported by Alex Middleton at Dionach.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 11:55:15 +00:00
Mark Tompsett
c91b16bd9e Bug 16637: Dependency for C4::Tags not listed
Added optional dependency, so as to explain why testing
explodes when the Enhanced Content system preference
TagsExternalDictionary is set. It is optional, because not only
does TagsExternalDictionary have to be set, but TagsEnabled
must be 'Allow'.

Also tweaked C4/Tags.pm to ignore TagsExternalDictionary,
if Lingua::Ispell is not installed. A warning is given.

TEST PLAN
---------
 1) Set the Enhanced Content system preference
    TagsExternalDictionary to /usr/bin/ispell

 2) sudo apt-get install liblingua-ispell-perl
    -- should be a new install

 3) prove t/db_dependent/Tags.t
    -- should work fine

 4) sudo apt-get remove liblingua-ispell-perl

 5) prove t/db_dependent/Tags.t
    -- should explode

 6) Clear the Enhanced Content system preference
    TagsExternalDictionary

 7) prove t/db_dependent/Tags.t
    -- should work fine

 8) apply patch

 9) prove t/db_dependent/Tags.t
    -- should work fine

10) Set the Enhanced Content system preference
    TagsExternalDictionary to /usr/bin/ispell

11) prove t/db_dependent/Tags.t
    -- should work, with warning.

12) sudo apt-get install liblingua-ispell-perl

13) prove t/db_dependent/Tags.t
    -- should work fine

14) run koha qa test tools.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Post-hackfest hotel Olympia lobby signoff. Kalimera!
Works as expected.
At this moment the Tags.t test does not need the database btw,
but the module should have much more test coverage.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:05:10 +00:00
a4c44b9f64 Bug 16695: Require Exception::Class 1.38 instead of 1.39
Looking at
http://cpansearch.perl.org/src/DROLSKY/Exception-Class-1.40/Changes
there is no need to require 1.39

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:08:20 +00:00
Bernardo Gonzalez Kriegel
dadd11af22 Bug 13669: followup to add DBIx::RunSQL dependency
Just that

To test:
1) run koha_perl_deps and check it show up

The module appears now on the About page.
Signed-off-by: Marc Véron <veron@veron.ch>

Ammended patch, only change is DBIx::RunSQL version,
now 0.14 :)

Module's author kindly accept to upgrade it, in particular
this makes Bug 16572 innecesary and is not needed to install
without problems.

Tested install on Ubuntu 14.04/Mysql 5.5.49, marc21 + all sample

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-25 09:57:31 +00:00
Julian Maurice
732ba8e345 Bug 15126: Update dependencies
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-04 13:52:14 +00:00
Mark Tompsett
a2aba3c86f Bug 14362: Regression tests
This should trigger the error. Attempts to shift system time
zones did not make sense as to the number of failures.

Added Time::Fake dependency, if it isn't installed these extra
tests don't run. There is a nice skip message about it.

Added License text.

TEST PLAN
---------
 1) apply test patch
 2) sudo dpkg-reconfigure tzdata
    -- set your system time to GMT (Africa/Abidjan)
 3) prove t/Circulation/AgeRestrictionMarkers.t
    -- should not fail, even if you change system
       time to any time.
 4) sudo dpkg-reconfigure tzdata
    -- set your timezone to Eastern
 5) sudo date -s"2015-06-18 21:15:00"
 6) date
    -- should be past 9pm Eastern timezone
 7) prove t/Circulation/AgeRestrictionMarkers.t
    -- kaboom!
 8) sudo date -s"2015-06-18 12:00:00"
 9) date
    -- should be noon Eastern timezone
10) prove t/Circulation/AgeRestrictionMarkers.t
    -- success?! Time sensitive tests are bad tests.
11) sudo apt-get install libtime-fake-perl
12) prove t/Circulation/AgeRestrictionMarkers.t
    -- kaboom!
    -- changing timezone to anything other than GMT
       should trigger a kaboom.
13) apply fix patch
14) prove t/Circulation/AgeRestrictionMarkers.t
    -- should work all the time.
15) less t/Circulation/AgeRestrictionMarkers.t
    -- the license text should be similar to
       http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence
16) koha qa test tools.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 18:06:40 +00:00
Colin Campbell
e2e9916348 Bug 7736: Support Ordering via Edifact EDI messages
Add support for processing incoming Edifact Quotes, Invoices
and order responses and generating and transmission of
Edifact Orders.
Basic workflow is that an incoming quote generates an aquisition
basket in Koha, with each line corresponding to an order record

The user can then generate an edifact order from this (or another)
basket, which is transferred to the vendor's site

The supplier generates an invoice on despatch and this will
result in corresponding invoices being generated in Koha
The orderlines on the invoice are receipted automatically.

We also support order response messages. This may include
simple order acknowledgements, supplier reports/amendments
on availability. Cancellation messages cause the koha order
to be cancelled, other messages are recorded against the order

Which messages are to be supported/processed is specifiable on a
vendor by vendor basis via the admin screens

You can also specify auto order i.e. to generate orders from quotes
without user intervention - This reflects existing
workflows where most work is done on the suppliers website
then generating a dummy quote

Received messages are stored in the edifact_messages table
and the original can be viewed via the online

Database changes are in installer/data/mysql/atomicchanges/edifact.sql
Note new perl dependencies:
    Net::SFTP:Foreign
    Text::Unidecode

Signed-off-by: Paul Johnson <p.johnson@staffs.ac.uk>

Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-04-01 20:03:17 +00:00
da052b3d10 Bug 16129: Remove URL::Encode dependency
This patch makes the PayPal integration feature independent from the
URL::Encode library, which is absent in some supported distributions.

It uses the URI package which is already a Koha dependency.

To test:
- Apply the patch
- Notice there are no deps for URL::Encode
- Follow the steps from the original patch
=> SUCCESS: It works as expected
- Sign-off :-D

Note: I deleted the line in which $amount_to_pay was url-encoded, because that's
one of the things query_form does (and the variable is only used as a parameter to it).

Sponsored-by: ByWater Solutions

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-04-01 18:48:18 +00:00
017699c345 Bug 16011: $VERSION - Remove the $VERSION init
Mainly a
  perl -p -i -e 's/^.*3.07.00.049.*\n//' **/*.pm
Then some adjustements

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-24 17:20:28 +00:00
Mirko Tietgen
f3e1e49797 Bug 14168 - enhance streaming cataloging to include youtube
Add optional embedding of YouTube videos via HTML5Media.
New syspref: HTML5MediaYouTube: Embed/Don't embed videos.
Format WEBM is hardcoded as it is the only format accepted by all
modern browsers.

Test plan:
- apply patch
- catalogue a YouTube link in 856$u
- turn on HTML5MediaEnabled and HTML5MediaYouTube
- open the record in OPAC and staff client, check that the
  'Play media' tab is showing and playing the video works.

Possible enhancements for followups:
- check available formats, offer quality choice
- accept official YT URL shortener

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Works perfectly!

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-03-02 00:40:00 +00:00
d9dc15f21e Revert Bug 11081 - Port Koha::Contrib::Tamil indexer into Koha code base
It has been decided that Moose should not be a dependency for Koha, and
that this patch set should be reverted to avoid it's use.

This reverts commit 43bcc1c42c.
This reverts commit e5f4a0e3d5.
This reverts commit 6d44b0a91a.
2016-03-01 16:56:35 +00:00
a8942c2884 Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues
Revert "DBRev to make notes of the XSS patches and the new important dependency."

This reverts commit e140603a59.

Revert "Bug 13618: Specific for branches.opac_info"

This reverts commit 06e4a50f00.

Revert "Bug 13618: (follow-up) Specific for other prefs"

This reverts commit d6475a111f.

Revert "Bug 13618: Fix for debarredcomment and patron messages"

This reverts commit dd98c9df92.

Revert "Bug 13618: Do not display html tags in patron's notices"

This reverts commit a065b243fe.

Revert "Bug 13618: Do not display &nbsp; and html tags in item fields content"

This reverts commit baeeaffbf8.

Revert "Bug 13618: Fix for system preference description"

This reverts commit a967a09261.

Revert "Bug 13618: Remove html filters for newly pushed code"

This reverts commit 0e98662b10.

Revert "Bug 13618: (follow-up) add missing lines for opac-shelves"

This reverts commit fc2fb605e5.

Revert "Bug 13618: (follow-up) Specific for ColumnsSettings"

This reverts commit bc308fdd9c.

Revert "Bug 13618: Fix for edit biblios and items"

This reverts commit 811c4e8402.

Revert "Bug 13618: followup to remove tabs"

This reverts commit ca8e8c397c.

Revert "Bug 13618: Fix last occurrences recently introduced to master"

This reverts commit bb417b256b.

Revert "Bug 13618: Fix for news"

This reverts commit ae5b98020a.

Revert "Bug 13618: Fix escape on sending baskets or shelves by email"

This reverts commit a7731ffe25.

Revert "Bug 13618: Specific for XSLTBloc"

This reverts commit 11fa38dc29.

Revert "Bug 13618: Specific for Salutation on editing a patron"

This reverts commit 36c07ad6d3.

Revert "Bug 13618: Specific for other prefs"

This reverts commit e6ea281a3b.

Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference"

This reverts commit 7824874557.

Revert "Bug 13618: Specific for ColumnsSettings"

This reverts commit 1834da3da3.

Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs"

This reverts commit 21ae62b253.

Revert "Bug 13618: Fix error 'Not a GLOB reference'"

This reverts commit 602bdbab4c.

Revert "Bug 13618: Specific for the ISBD view"

This reverts commit d254362435.

Revert "Bug 13618: Specific for pagination_bar"

This reverts commit 8837a8ae68.

Revert "Bug 13618: Specific places where we don't need to escape variables - intra"

This reverts commit 00eff140b3.

Revert "Bug 13618: Remove html filters at the intranet"

This reverts commit 7db851ff03.

Revert "Bug 13618: Specific places where we don't need to escape variables"

This reverts commit 49a3738b8d.

Revert "Bug 13618: Remove html filters at the OPAC"

This reverts commit cedaa0e23e.

Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter"

This reverts commit 01b38d3b13.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-11 19:39:53 +00:00
Jonathan Druart
01b38d3b13 Bug 13618: Use Template::Stash::AutoEscaping to use the html filter
Test plan:
0/ sudo cpanm Template::Stash::AutoEscaping
1/ Verify don't reproduce the XSS issue described on bug 13609 and other
xss related bugs.
2/ Try to find some encoding issues (detail page, search results,
facets, etc.)

Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-01-29 17:54:11 +00:00
c2f667b4f2 Bug 15680 - Fresh install of Koha cannot find any dependencies
Revert "Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/Installer/PerlModules.pm"

This reverts commit 0e356b214e.

Fixing the evals in PerlModules.pm to pass perl critic has caused
a regression. If appears that using a block eval will not work here,
at least not in its current form.
2016-01-27 16:15:42 +00:00
6d44b0a91a Bug 11081: Port Koha::Contrib::Tamil indexer into Koha code base
Add two scripts for indexing: koha-index and koha-index-daemon.

Documentation:

  perldoc koha-index
  perldoc koha-index-daemon

New dependencies:

  MooseX::Getopt
  MooseX::RW
  AnyEvent::Processor

Available as a Debian package: libmoosex-getopt-perl

Test plan:

- Apply the patch
- Install dependencies, if necessary
- Reindex a whole biblio catalog:
  koha-index --verbose
- Reindex a whole authorities catalog:
  koha-index --source authority --verbose
- Modify 1 biblio record, and index it:
  koha-index --select queue
- Modifiy 1 authority record, and index it:
  koha-index --select queue --source authority
- Run indexing daemon, with a 15s timeout:
  koha-index-daemon --timeout 15
- Modify a biblio record: wait 15s, and see
- Modify an authority record: wait 15s, and see

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Works well, followed test plan without problems

One comment: perhaps an option for koha-index-daemon
to work quietly, without printing information.

No koha-qa errors, but new files don't have license,
fixed in followup

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:30:44 +00:00