[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #43 from Joonas Kylmälä  ---
(In reply to Joonas Kylmälä from comment #41)
> On Koha-testing-docker I get randomly the following error when trying to
> select a new branch on intranet (/cgi-bin/koha/circ/set-library.pl):
> 
> CGI::Session::Driver::mysql::store(): DBI Exception: DBD::mysql::db do
> failed: Incorrect string value: '\xE4iskap...' for column
> `koha_kohadev`.`sessions`.`a_session` at row 1 [for Statement "INSERT INTO
> sessions (id, a_session) VALUES(?, ?) ON DUPLICATE KEY UPDATE a_session =
> ?"] at /usr/share/perl5/CGI/Session.pm line 251
>  at /usr/share/perl5/DBIx/Class/Exception.pm line 77
> 
> The branch I try to select has the following name: "Alkuperäiskappaleet, ei
> lainata".

I made another report now as bug 28489, I think these two are related. This
doesn't happen when strict_sql_modes = 0, only with strict_sql_modes = 1

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Joonas Kylmälä  changed:

   What|Removed |Added

 Blocks||28489


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489
[Bug 28489] CGI::Session is incorrectly serialized to DB in production env /
when strict_sql_modes = 0
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #42 from Joonas Kylmälä  ---
(In reply to Joonas Kylmälä from comment #41)
> On Koha-testing-docker I get randomly the following error when trying to
> select a new branch on intranet (/cgi-bin/koha/circ/set-library.pl):
> 
> CGI::Session::Driver::mysql::store(): DBI Exception: DBD::mysql::db do
> failed: Incorrect string value: '\xE4iskap...' for column
> `koha_kohadev`.`sessions`.`a_session` at row 1 [for Statement "INSERT INTO
> sessions (id, a_session) VALUES(?, ?) ON DUPLICATE KEY UPDATE a_session =
> ?"] at /usr/share/perl5/CGI/Session.pm line 251
>  at /usr/share/perl5/DBIx/Class/Exception.pm line 77
> 
> The branch I try to select has the following name: "Alkuperäiskappaleet, ei
> lainata".

Aha, I am able to reproduce the error now always: switch first to
"Alkuperäiskappaleet, ei lainata" branch and then try it to set it again and
you will get this error.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #41 from Joonas Kylmälä  ---
On Koha-testing-docker I get randomly the following error when trying to select
a new branch on intranet (/cgi-bin/koha/circ/set-library.pl):

CGI::Session::Driver::mysql::store(): DBI Exception: DBD::mysql::db do failed:
Incorrect string value: '\xE4iskap...' for column
`koha_kohadev`.`sessions`.`a_session` at row 1 [for Statement "INSERT INTO
sessions (id, a_session) VALUES(?, ?) ON DUPLICATE KEY UPDATE a_session = ?"]
at /usr/share/perl5/CGI/Session.pm line 251
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77

The branch I try to select has the following name: "Alkuperäiskappaleet, ei
lainata".

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Fridolin Somers  changed:

   What|Removed |Added

 CC||fridolin.som...@biblibre.co
   ||m

--- Comment #40 from Fridolin Somers  ---
Depends on Bug 22824 not in 20.11.x

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Jonathan Druart  changed:

   What|Removed |Added

   Keywords|rel_21_05_candidate |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #39 from Jonathan Druart  ---
Pushed to master for 21.05, thanks to everybody involved!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to master
 Version(s)||21.05.00
released in||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Jonathan Druart  changed:

   What|Removed |Added

 Status|In Discussion   |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #38 from David Cook  ---
If we're set on removing the YAML and YAML::Syck dependencies, then I say we
move this back to "Passed QA". While in theory we could use YAML::XS with
CGI::Session::Serialize::yaml, the Debian packaging of it means we would have
to keep either YAML or YAML::Syck installed on the system, even if it was
unused.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #37 from David Cook  ---
Interestingly, CGI::Session::Serialize::default writes out a Perl data
structure and then uses the equivalent of eval() to inject it back into Perl:
https://metacpan.org/release/CGI-Session/source/lib/CGI/Session/Serialize/default.pm#L39.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #36 from David Cook  ---
Interestingly, CGI::Session::Serialize::default writes out a Perl data
structure and then uses the equivalent of eval() to inject it back into Perl:
https://metacpan.org/release/CGI-Session/source/lib/CGI/Session/Serialize/default.pm#L39.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #35 from David Cook  ---
Well, I just looked at CGI::Session::Serialize::default and did a little test
using its freeze method. The data ends up looking like this:

$D = {'firstname' => 'David','surname' => 'Cook','id' => '1'};;$D

I could probably parse that...

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #34 from David Cook  ---
(In reply to David Cook from comment #33)
> (In reply to Julian Maurice from comment #24)
> > If we really want to stick with YAML, I'd prefer Koha to have its own
> > implementation rather than relying on an undocumented "feature" (from my
> > point of view that is not a feature, this is just messing with a module's
> > internal variables)
> 
> (In reply to Jonathan Druart from comment #28)
> > Then write an alternative patch and test it please.
> 
> Ok. I figured Julian had already disagreed with my proposal, but I can do it
> anyway.

Ah, alas, due to the Debian packaging of
https://packages.debian.org/buster/libcgi-session-serialize-yaml-perl, you
cannot remove libyaml-perl and libyaml-syck-perl without removing
libcgi-session-serialize-yaml-perl.

I'm still not sure why we have to remove YAML or YAML::Syck. I understand that
it would be annoying to have one of the modules around just for handling the
session, but it would be nice to keep the session serialized as YAML.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #33 from David Cook  ---
(In reply to Julian Maurice from comment #24)
> If we really want to stick with YAML, I'd prefer Koha to have its own
> implementation rather than relying on an undocumented "feature" (from my
> point of view that is not a feature, this is just messing with a module's
> internal variables)

(In reply to Jonathan Druart from comment #28)
> Then write an alternative patch and test it please.

Ok. I figured Julian had already disagreed with my proposal, but I can do it
anyway.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #32 from David Cook  ---
(In reply to Kyle M Hall from comment #29)
> Wouldn't it make more sense for your to add an API endpoint for outputting
> deserialized session info? That way you aren't messing with Koha's
> internals, which are subject to change.

I shouldn't have said third-party apps, as they're not really third-party.
They're just non-Koha apps served off the same domain. 

Regarding your question, yes and no.

1. No:
Firstly, everything is subject to change. I've seen API integrations break when
the API endpoint gets updated. In this case, I can see Koha changes coming, and
the code can get updated. Plus, the sessions are fairly stable overall (when
serialized as YAML at least). It's not a drama. 

Secondly, at the moment I can use the session without any local customizations
to Koha. 

2. Yes:
If I were to use an API endpoint, it would require customization, and I
probably wouldn't create an endpoint outputting session data. Instead, I'd
probably make multiple API endpoints to get the specific data that I need (like
effective user permissions). 

In this case, I have access to the CGISESSID cookie, so I have the session ID,
and Koha is working kind of like a SSO system. If I were to use an API, I would
need an endpoint that could convert a session ID to a borrowernumber. But then
Koha doesn't have any authorizations/permissions that would really be
appropriate for that kind of administrative process. 

And I would consider it an administrative process. As such, I wouldn't love the
idea of it being part of Koha's public Internet-accessible API. I would want to
lock down that API endpoint within a separate Koha Admin API which could be
limited to specific IP addresses or a local network. 

Koha also doesn't have a concept of "system users" that are reserved just for
API user (and which can't be deleted by library staff). 

So... while using an API might make sense... it would be a tonne of work. Much
more work than just reading the session from the database. 

--

At the end of the day, I imagine we'll switch the serializer to default, and
then I'll have to think up some kind of hacked together API solution. Or scrap
the other apps. 

Koha really needs an administrator level above superlibrarian, or some other
management interface. But it all takes considerable work.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #31 from Victor Grousset/tuxayo  ---
(In reply to David Cook from comment #26)
> My third-party apps neither use Perl nor have the capacity to use Perl, so
> that's not an option :p. 

Would writing a small Perl proxy(is that's the right term) work?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #30 from Tomás Cohen Arazi  ---
(In reply to Kyle M Hall from comment #29)
> (In reply to David Cook from comment #27)
> > (In reply to Jonathan Druart from comment #25)
> > > David, thanks for the investigation.
> > > 
> > > All what you suggest is more work than what we have now, and I won't have
> > > more time to dedicate to this, we are close to the release.
> > > We should open a new bug report to reintroduce yaml using YAML::XS, later.
> > > Unless someone else has time to do it before the end of the week.
> > 
> > Surely the least amount of work would be to just keep the YAML::Syck
> > dependency for CGI::Session::Serialize::yaml for the time being, and then
> > change it to YAML::XS later?
> > 
> > If we change it to the default serializer now, I think it would much harder
> > to switch back to YAML later.
> 
> Wouldn't it make more sense for your to add an API endpoint for outputting
> deserialized session info? That way you aren't messing with Koha's
> internals, which are subject to change.

+1

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #29 from Kyle M Hall  ---
(In reply to David Cook from comment #27)
> (In reply to Jonathan Druart from comment #25)
> > David, thanks for the investigation.
> > 
> > All what you suggest is more work than what we have now, and I won't have
> > more time to dedicate to this, we are close to the release.
> > We should open a new bug report to reintroduce yaml using YAML::XS, later.
> > Unless someone else has time to do it before the end of the week.
> 
> Surely the least amount of work would be to just keep the YAML::Syck
> dependency for CGI::Session::Serialize::yaml for the time being, and then
> change it to YAML::XS later?
> 
> If we change it to the default serializer now, I think it would much harder
> to switch back to YAML later.

Wouldn't it make more sense for your to add an API endpoint for outputting
deserialized session info? That way you aren't messing with Koha's internals,
which are subject to change.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Jonathan Druart  changed:

   What|Removed |Added

 Comment #28 is|1   |0
private||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #27 from David Cook  ---
(In reply to Jonathan Druart from comment #25)
> David, thanks for the investigation.
> 
> All what you suggest is more work than what we have now, and I won't have
> more time to dedicate to this, we are close to the release.
> We should open a new bug report to reintroduce yaml using YAML::XS, later.
> Unless someone else has time to do it before the end of the week.

Surely the least amount of work would be to just keep the YAML::Syck dependency
for CGI::Session::Serialize::yaml for the time being, and then change it to
YAML::XS later?

If we change it to the default serializer now, I think it would much harder to
switch back to YAML later.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #26 from David Cook  ---
(In reply to Julian Maurice from comment #24)
> (In reply to David Cook from comment #20)
> > I have third-party apps that can use Koha session data by parsing the YAML.
> > It looks like I'll have to think of something much more complicated to deal
> > with the change in serialization.
> It's not very complicated, you just have to use
> `CGI::Session::Serialize::default->thaw($session_data)`

My third-party apps neither use Perl nor have the capacity to use Perl, so
that's not an option :p. 

> > We could fork CGI::Session::Serialize::yaml and make a
> > CGI::Session::Serialize::Koha.
> > 
> > Ahhh CGI::Session::Serialize::yaml also has an undocumented feature. If you
> > look at the source code, you'll see that you can set
> > $CGI::Session::Serialize::yaml::Flavour to whatever YAML module you want
> > that can use Dump/Load methods. (Note that you'd have to preload it yourself
> > with 'use' or 'require'.)
> > 
> > So... it looks like CGI::Session::Serialize::yaml can work with YAML::XS.
> > 
> > Personally, it would be awesome if we could retain the use of
> > CGI::Session::Serialize::yaml. 
> If we really want to stick with YAML, I'd prefer Koha to have its own
> implementation rather than relying on an undocumented "feature" (from my
> point of view that is not a feature, this is just messing with a module's
> internal variables)

It's not an internal variable. It's a package variable. That's why they have
scoped it that way. Based on my conversations with the
CGI::Session::Serialize::yaml maintainer, we'll probably add a class method for
explicitly choosing the YAML implementation.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #25 from Jonathan Druart  ---
David, thanks for the investigation.

All what you suggest is more work than what we have now, and I won't have more
time to dedicate to this, we are close to the release.
We should open a new bug report to reintroduce yaml using YAML::XS, later.
Unless someone else has time to do it before the end of the week.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #24 from Julian Maurice  ---
(In reply to David Cook from comment #20)
> I have third-party apps that can use Koha session data by parsing the YAML.
> It looks like I'll have to think of something much more complicated to deal
> with the change in serialization.
It's not very complicated, you just have to use
`CGI::Session::Serialize::default->thaw($session_data)`

> We could fork CGI::Session::Serialize::yaml and make a
> CGI::Session::Serialize::Koha.
> 
> Ahhh CGI::Session::Serialize::yaml also has an undocumented feature. If you
> look at the source code, you'll see that you can set
> $CGI::Session::Serialize::yaml::Flavour to whatever YAML module you want
> that can use Dump/Load methods. (Note that you'd have to preload it yourself
> with 'use' or 'require'.)
> 
> So... it looks like CGI::Session::Serialize::yaml can work with YAML::XS.
> 
> Personally, it would be awesome if we could retain the use of
> CGI::Session::Serialize::yaml. 
If we really want to stick with YAML, I'd prefer Koha to have its own
implementation rather than relying on an undocumented "feature" (from my point
of view that is not a feature, this is just messing with a module's internal
variables)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

David Cook  changed:

   What|Removed |Added

 Status|Passed QA   |In Discussion

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #23 from David Cook  ---
I've opened a couple issues at
https://rt.cpan.org/Dist/Display.html?Name=CGI-Session-Serialize-yaml regarding
documentation and module options.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #22 from David Cook  ---
Interestingly, Tina Muller who has taken over CGI::Session::Serialize::yaml is
also the maintainer of YAML::XS. 

Ahhh CGI::Session::Serialize::yaml also has an undocumented feature. If you
look at the source code, you'll see that you can set
$CGI::Session::Serialize::yaml::Flavour to whatever YAML module you want that
can use Dump/Load methods. (Note that you'd have to preload it yourself with
'use' or 'require'.)

So... it looks like CGI::Session::Serialize::yaml can work with YAML::XS.

Personally, it would be awesome if we could retain the use of
CGI::Session::Serialize::yaml. 

I'm going to move this to "In Discussion", but if no one else cares, feel free
to move back to "Passed QA".

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #21 from David Cook  ---
(In reply to Julian Maurice from comment #0)
> Recently we replaced every use of YAML::Syck or YAML by YAML::XS, and
> removed YAML::Syck and YAML from cpanfile.
> But we use CGI::Session::Serialize::yaml which does not work with YAML::XS
> and need either YAML::Syck or YAML
> 
> So we shoud either:
> 1) Reintroduce one of YAML or YAML::Syck into cpanfile, or
> 2) Use a different serializer, or
> 3) Implement in Koha a serializer that use YAML::XS (should be easy, look at
> https://metacpan.org/release/CGI-Session-Serialize-yaml/source/lib/CGI/
> Session/Serialize/yaml.pm)
> 
> Which one do you prefer ?

We could fork CGI::Session::Serialize::yaml and make a
CGI::Session::Serialize::Koha.

We could also contribute a patch or raise an enhancement request to
CGI::Session::Serialize::yaml, so that it can use YAML::XS. 

It looks like the module got a new maintainer last year
https://rt.cpan.org/Public/Bug/Display.html?id=131715

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #20 from David Cook  ---
(In reply to Jonathan Druart from comment #3)
> Why don't we use CGI::Session::Serialize::default instead?

It's a shame that we're losing the YAML serialization. 

As noted on https://metacpan.org/pod/CGI::Session::Serialize::yaml, using YAML
makes it easy to share session data across different languages. 

I have third-party apps that can use Koha session data by parsing the YAML. It
looks like I'll have to think of something much more complicated to deal with
the change in serialization.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Julian Maurice  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

--- Comment #19 from Julian Maurice  ---
Followed the test plan + tested the install process after making sure I had no
YAML or YAML::Syck installed.
No problem detected

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Julian Maurice  changed:

   What|Removed |Added

 Attachment #120839|0   |1
is obsolete||

--- Comment #18 from Julian Maurice  ---
Created attachment 120840
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120840&action=edit
Bug 28317: Use the default CGI::Session serializer

We remove YAML::Syck on bug 22824 and YAML on 27673, to use YAML::XS.
However we need one of them for CGI::Session::Serialize::yaml
It's preferable to change the serializer and use the default one instead
of writing one based on YAML::XS (or patch the existing ::yaml that does
not seem maintained).

There was an encoding bug reported on the default serializer (see commit
a858e8a8b895640f2) but we fail to recreate it.

Test plan:
Create 3 libraries with branchcode=branchname: "CPL", "ÄÄÄ~ÄãÃ" and "✔️ ❤️ ★"
Use the 3 options of SessionStorage and switch from one logged in
library to another.
Confirm that everything is working correctly (ie. no ending issue in the
library name at the top-right corner)

Signed-off-by: Kyle M Hall 
Signed-off-by: Julian Maurice 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Kyle M Hall  changed:

   What|Removed |Added

 Attachment #120837|0   |1
is obsolete||

--- Comment #17 from Kyle M Hall  ---
Created attachment 120839
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120839&action=edit
Bug 28317: Use the default CGI::Session serializer

We remove YAML::Syck on bug 22824 and YAML on 27673, to use YAML::XS.
However we need one of them for CGI::Session::Serialize::yaml
It's preferable to change the serializer and use the default one instead
of writing one based on YAML::XS (or patch the existing ::yaml that does
not seem maintained).

There was an encoding bug reported on the default serializer (see commit
a858e8a8b895640f2) but we fail to recreate it.

Test plan:
Create 3 libraries with branchcode=branchname: "CPL", "ÄÄÄ~ÄãÃ" and "✔️ ❤️ ★"
Use the 3 options of SessionStorage and switch from one logged in
library to another.
Confirm that everything is working correctly (ie. no ending issue in the
library name at the top-right corner)

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Kyle M Hall  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #120836|0   |1
is obsolete||

--- Comment #16 from Jonathan Druart  ---
Created attachment 120837
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120837&action=edit
Bug 28317: Use the default CGI::Session serializer

We remove YAML::Syck on bug 22824 and YAML on 27673, to use YAML::XS.
However we need one of them for CGI::Session::Serialize::yaml
It's preferable to change the serializer and use the default one instead
of writing one based on YAML::XS (or patch the existing ::yaml that does
not seem maintained).

There was an encoding bug reported on the default serializer (see commit
a858e8a8b895640f2) but we fail to recreate it.

Test plan:
Create 3 libraries with branchcode=branchname: "CPL", "ÄÄÄ~ÄãÃ" and "✔️ ❤️ ★"
Use the 3 options of SessionStorage and switch from one logged in
library to another.
Confirm that everything is working correctly (ie. no ending issue in the
library name at the top-right corner)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

Jonathan Druart  changed:

   What|Removed |Added

Summary|CGI::Session::Serialize::ya |Remove
   |ml needs either YAML::Syck  |CGI::Session::Serialize::ya
   |or YAML |ml dependency by using the
   ||default serializer

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/