[Bug 28489] New: CGI::Session is incorrectly serialized to DB in production env / when strict_sql_modes = 0
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Bug ID: 28489 Summary: CGI::Session is incorrectly serialized to DB in production env / when strict_sql_modes = 0 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Authentication Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org CC: dcook@prosentient.com.au, dpavlin@rot13.org, jonathan.druart+koha@gmail.com, julian.maurice@biblibre.com Depends on: 28317 The changes introduced in bug 28317 regarding CGI::Sessions serialization works OK with koha-testing-docker where KOHA_TESTING env and "strict_sql_modes" koha-conf.xml config is set to True. However, according to our documentation strict_sql_modes it should not be used in production environment. If it is disabled then the CGI::Session serialization encoding breaks. To reproduce: 1) Set strict_sql_modes = 1 in koha-conf.xml (depending on your test environment variables you might also just wanna uncomment the relevant code in Koha/Database.pm) 2) Create branch with a display name "Testä" and switch to that branch in intranet. 3) Go to some page in intranet and notice the branch is displayed incorrectly in the menu Alternatively this can cause major trouble if for example a branchcode contains non-ascii letters, e.g. Ä. Then for example on returns.pl we get following error (and I think lots of other things break as well):
Broken FK constraint at /usr/share/perl5/Exception/Class/Base.pm line 88
Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317 [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer -- 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=28489 --- Comment #1 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Relating to this is another bug but it only happens with strict_sql_modes = 1, so if we come up with a fix for this we should make sure it handles this case as well. The other issue is:
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
This happens when trying to to set on the page /cgi-bin/koha/circ/set-library.pl the active branch another time to what is selected already AND the branch display contains an "ä" character. -- 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=28489 --- Comment #2 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- The problem is fixed by enabling the Mariadb/Mysql STRICT_TRANS_TABLES mode. -- 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=28489 --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Joonas Kylmälä from comment #2)
The problem is fixed by enabling the Mariadb/Mysql STRICT_TRANS_TABLES mode.
Even though this fixes it I'm not convinved it is the right fix. Maybe we our output is not UTF8 to the database: https://metacpan.org/pod/CGI::Session#Influencing-the-encoding-of-the-program's-output Also here more on this: https://stackoverflow.com/questions/31049125/perl-cgisession-mysql-thaw-utf-... -- 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=28489 --- Comment #4 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Joonas Kylmälä from comment #0)
1) Set strict_sql_modes = 1 in koha-conf.xml (depending on your test environment variables you might also just wanna uncomment the relevant code
I typoed this, in fact the strict_sql_modes need to be set to 0 to reproduce this. -- 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=28489 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- I found another workaround: $datastr = decode_utf8(encode_utf8($datastr)); inside CGI::Session::Driver::mysql::store fixes the problem. The difference seems to be that $datastr is not marked as utf8 string. And after it is (decode_utf8 does it) the string is stored correctly to the DB. -- 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=28489 --- Comment #6 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Data::Dumper, which the default serializer uses, seems to produce iso-latin-1 strings: https://www.perlmonks.org/?node_id=759457 Our database connection is configured for utf8mb4 so that could be the issue here. I don't know if we can fix this from koha code other than by changing the database connection to iso-latin-1 for the sessions table. Or maybe changing sessions table to iso-latin-1 could make this work automatically? -- 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=28489 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, I think we store some things like a user name in the sessions table, so not sure if changing the table to latin-1 is an option. -- 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=28489 --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- The weird thing is that it works correctly with characters like ✓ It seems like the problem is that ä in Latin-1 is the same as the unicode code point (E4) which probably confuses some encoding auto-detection mechanism -- 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=28489 --- Comment #9 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Julian Maurice from comment #8)
The weird thing is that it works correctly with characters like ✓ It seems like the problem is that ä in Latin-1 is the same as the unicode code point (E4) which probably confuses some encoding auto-detection mechanism
It only confuses the C code implementation of Data::Dumper, if we enable local $Data::Dumper::Useperl = 1; or just put in the default serializer directly the following line
$d->Useperl( 1 );
it starts working. I just don't know if we can make it a workable solution. -- 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=28489 --- Comment #10 from Julian Maurice <julian.maurice@biblibre.com> --- If I modify sessions.a_session from longtext to longblob I no longer have the bug. Can you test if it works for you too ? -- 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=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_05_candidate -- 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=28489 --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 121539 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121539&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This column contains serialized data, it should be a blob. And it fixes encoding issues. Test plan: 1. Apply patch and run updatedatabase 2. In $KOHA_CONF make sure that you have <strict_sql_modes>0</strict_sql_modes> 3. Create 2 libraries: a. TESTÄ/Testä b. TEST✓/Test✓ 4. Go to the staff interface, change your library to Testä, then navigate to a few other pages, make sure there is no encoding problem with the library name in the top right corner 5. Do the same with Test✓ -- 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=28489 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=28489 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |julian.maurice@biblibre.com |ity.org | -- 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=28489 Peter Vashchuk <stalkernoid@gmail.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=28489 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121539|0 |1 is obsolete| | --- Comment #12 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 121541 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121541&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This column contains serialized data, it should be a blob. And it fixes encoding issues. Test plan: 1. Apply patch and run updatedatabase 2. In $KOHA_CONF make sure that you have <strict_sql_modes>0</strict_sql_modes> 3. Create 2 libraries: a. TESTÄ/Testä b. TEST✓/Test✓ 4. Go to the staff interface, change your library to Testä, then navigate to a few other pages, make sure there is no encoding problem with the library name in the top right corner 5. Do the same with Test✓ Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #13 from Andrew Nugged <nugged@gmail.com> --- Yesterday I experimented with the same – I changed to "mediumblob" manually on my local test server to find a solution and it worked. What I can say that I found that Data::Dumper when converting Perl strings scalars acts "fuzzily" (better: weirdly), and if it meets real Unicode chars it stores them in the string in \xXX perl-form, so they stored in DB properly and restored properly, for example, I created branch "Čentervälly": it is stored in MySQL in a_session dumped in this way: 'branchname' => "\x{10c}enterv\x{e4}lly" so here it works and no error happens, but when it meets only single "ä" for example "Hämeenlinna" (and maybe few other characters like that which suspect can be represented in old ASCII latin-1 or how that fuzziness fuzzies :)...) chars, so it stores in such a way in MySQL longtext (broken): 'branchname' => 'H?meenlinna', because: see below hex dump of the blob, and when it saves to UTF-8-MySQL-field – it gets malformed, but yes, with blob it works: 'branchname' => 'Hämeenlinna', and when I looked inside blob in HEX, I see: 48 E4 6D 65 65 6E 6C 69 6E 6E 61 H‰meenlinna because it stores ä as E4 and it is then get returned "in the same way" into "ä" (seems). But oh that's silvertape everywhere :). This is just to say, that it weird but WORKS with blob, so – thanks Julian for the patch, and I say I support it, (yet I'd blame Data::Dumper "fuzziness" :) ) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #14 from David Cook <dcook@prosentient.com.au> --- /me still thinks we should've stuck with YAML -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #15 from Andrew Nugged <nugged@gmail.com> --- Julian, thanks for patch, can you also add DB changes to kohastructure.sql as well, not just atomic update, so we can then again Sign-off this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED --- Comment #16 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Andrew Nugged from comment #15)
Julian, thanks for patch,
can you also add DB changes to kohastructure.sql as well, not just atomic update,
so we can then again Sign-off this?
Ah yes I forgot that. I'll write the patch ASAP -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121541|0 |1 is obsolete| | --- Comment #17 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 121563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121563&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This patch modifies kohastructure.sql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121563|0 |1 is obsolete| | --- Comment #18 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 121564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121564&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This column contains serialized data, it should be a blob. And it fixes encoding issues. Test plan: 1. Apply patch and run updatedatabase 2. In $KOHA_CONF make sure that you have <strict_sql_modes>0</strict_sql_modes> 3. Create 2 libraries: a. TESTÄ/Testä b. TEST✓/Test✓ 4. Go to the staff interface, change your library to Testä, then navigate to a few other pages, make sure there is no encoding problem with the library name in the top right corner 5. Do the same with Test✓ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #19 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 121565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121565&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob (kohastructure.sql) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Julian Maurice <julian.maurice@biblibre.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=28489 Peter Vashchuk <stalkernoid@gmail.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=28489 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121564|0 |1 is obsolete| | Attachment #121565|0 |1 is obsolete| | --- Comment #20 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 121570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121570&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This column contains serialized data, it should be a blob. And it fixes encoding issues. Test plan: 1. Apply patch and run updatedatabase 2. In $KOHA_CONF make sure that you have <strict_sql_modes>0</strict_sql_modes> 3. Create 2 libraries: a. TESTÄ/Testä b. TEST✓/Test✓ 4. Go to the staff interface, change your library to Testä, then navigate to a few other pages, make sure there is no encoding problem with the library name in the top right corner 5. Do the same with Test✓ Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #21 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 121571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121571&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob (kohastructure.sql) Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Andrew Nugged <nugged@gmail.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=28489 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121570|0 |1 is obsolete| | --- Comment #22 from Andrew Nugged <nugged@gmail.com> --- Created attachment 121584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121584&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This column contains serialized data, it should be a blob. And it fixes encoding issues. Test plan: 1. Apply patch and run updatedatabase 2. In $KOHA_CONF make sure that you have <strict_sql_modes>0</strict_sql_modes> 3. Create 2 libraries: a. TESTÄ/Testä b. TEST✓/Test✓ 4. Go to the staff interface, change your library to Testä, then navigate to a few other pages, make sure there is no encoding problem with the library name in the top right corner 5. Do the same with Test✓ Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Andrew Nugged <nugged@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121571|0 |1 is obsolete| | --- Comment #23 from Andrew Nugged <nugged@gmail.com> --- Created attachment 121585 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121585&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob (kohastructure.sql) Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Andrew Nugged <nugged@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |victor@tuxayo.net --- Comment #24 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Futher tests. == Master == 1. Try to hold from the OPAC with delivery to TESTÄ/Testä or TEST✓/Test✓ => ERROR: Internal error: incomplete hold request. (odd, nothing in all the logs, just the HTTP request returning 200) 2. Staff interface set library: TESTÄ/Testä transfer item to any another library => Broken FK constraint at /usr/share/perl5/Exception/Class/Base.pm line 88 Oddly it works with TEST✓/Test✓ 3. Staff interface set library: TESTÄ/Testä checkout an item => Broken FK constraint at /usr/share/perl5/Exception/Class/Base.pm line 88 Oddly it works with TEST✓/Test✓ 4. Staff interface set library: NOT TESTÄ/Testä checkout an item set library: TESTÄ/Testä partron page => checkout tab => show checkouts try to check in => it's loads for ever => logs: Broken FK constraint at /usr/share/perl5/Exception/Class/Base.pm line 88 refresh page The item has actually been checked in. (not sure if DB is in a consistent state) 5. Same but use the check in tab of the search box, next to the Koha logo == Does anyone know why TEST✓/Test✓ doesn't cause issue? At least it should cause as much issues as TESTÄ/Testä. == With patches == 1. fails! 2. passes 3. fails! 4. passes 5. fails! (odd) So, QA fails! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #25 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Does anyone have more ideas of tests? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #26 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Victor Grousset/tuxayo from comment #24)
== With patches == 1. fails! 2. passes 3. fails! 4. passes 5. fails! (odd)
So, QA fails!
Looks like it works better with the patch, so why do you say that ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #27 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Victor Grousset/tuxayo from comment #24)
Does anyone know why TEST✓/Test✓ doesn't cause issue? At least it should cause as much issues as TESTÄ/Testä. see comment 8 and comment 13
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #28 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Cannot recreate 1, but 3: - New library created TESTÄ/TESTÄ - Use it for logged in library - Checkout Invalid value passed, branchcode=\xC4 expected type is string at /usr/share/perl5/Exception/Class/Base.pm line 88 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #29 from Victor Grousset/tuxayo <victor@tuxayo.net> --- comment 28
Cannot recreate 1
Ok, it needs also to have TESTÄ/Testä and TEST✓/Test✓ as the library code. The idea was {Asian, Arabic, Pakistanis, Cyrillic} writing libraries (and more) might not always transliterate. Is that actually correct? Or is that out of scope? Are the test plan also out of scope? Assuming one or more of them still fail with ascii library code. Comment 26
So, QA fails! Looks like it works better with the patch, so why do you say that ?
Indeed it works better. That was based on the assumption that these tests are in the scope of this bug. Which is uncertain now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #30 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I imagine cyrillic in library codes and library names to be a good test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #31 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- It can be recreated easily using: use Koha::Cities; use CGI::Session::Serialize::default; #$Data::Dumper::Useperl = 1; use utf8; my $branchname = "TESTÄ/Testä"; my $hash = { branch => $branchname }; my $s = CGI::Session::Serialize::default->freeze($hash); $hash = CGI::Session::Serialize::default->thaw($s); Koha::City->new({city_name => $hash->{branch}})->store; It fails with Incorrect string value: '\xC4/Test...' for column 'city_name' at row 1 But inserts the city correctly if the Useperl line is uncommented. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #32 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121624&action=edit Bug 28489: Fix issues with umlaut in session vars -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #33 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This last patch seems to fix the problem, can someone test or give their opinions on it please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stalkernoid@gmail.com --- Comment #34 from Peter Vashchuk <stalkernoid@gmail.com> ---
I imagine cyrillic in library codes and library names to be a good test.
I tested naming libraries with cyrillic symbols, like "Бібліотека" and it works fine with and without the patch. Then, I tested a bunch of other special characters from different languages, here's the list of them: These ones work fine without the patch: ааа ААА яяя ЯЯЯ ііі ІІІ ЄЄЄ єєє łłł ŁŁŁ ŽŽŽ Meanwhile these ones get shown as "???" without the patch: äää ÄÄÄ ööö ÖÖÖ ààà ááá æææ ÆÆÆ ååå ÅÅÅ ôôô ÔÔÔ üüü ÜÜÜ ëëë ËËË ççç ććć meanwhile with patch these symbols are displayed correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #35 from Peter Vashchuk <stalkernoid@gmail.com> ---
I imagine cyrillic in library codes and library names to be a good test.
I tested naming libraries with cyrillic symbols, like "Бібліотека" and it works fine with and without the patch. Then, I tested a bunch of other special characters from different languages, here's the list of them: These ones work fine without the patch: ааа ААА яяя ЯЯЯ ііі ІІІ ЄЄЄ єєє łłł ŁŁŁ ŽŽŽ ććć Meanwhile these ones get shown as "???" without the patch: äää ÄÄÄ ööö ÖÖÖ ààà ááá æææ ÆÆÆ ååå ÅÅÅ ôôô ÔÔÔ üüü ÜÜÜ ëëë ËËË ççç meanwhile with patch all these symbols are displayed correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #36 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ok, so with the patch all is good...? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #37 from Peter Vashchuk <stalkernoid@gmail.com> --- (In reply to Victor Grousset/tuxayo from comment #24)
Further tests. == Master == ... == With patches == ...
Hey, I couldn't reproduce it, I didn't manage to get any errors like that neither on master, nor with two previous patches that were signed off by me previously. Everything seems to magically work on my local koha so I am not sure what the problem is. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #38 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Wait a bit, Julian and me are trying to come with a better solution. My last patch is removing the different problems listed previously, but it's 1. ugly and 2. incorrect (we only fix the problem in set_userenv whereas it must be fixed at session level). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #39 from Andrew Nugged <nugged@gmail.com> --- I also don't like direct utf8 flag change on lower level: later it can bring more errors even if we manage for now them not to happen :P. But I also tried with Victor's findings and can't: Jonathan/Julian – have you able to reproduce what Victor said? Hint me how, for me it just worked (comment 24). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #40 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Julian, Andrew and me worked on it today but we have not found a correct solution so far. The only viable solution would be: 1. For master: Replace CGI::Session with Data::Session using JSON serialization (see bug 17427 and note that there is still a problem there) 2. For 21.05: Reintroduce the YAML dependency and use YAML serialization with CGI::Session (we know it is a working solution and we are failing to provide a fix with Data::Dumper) 3. Developers will test Data::Session in master 4. Eventually backport the Data::Session move into 21.05 Note that the proposed solution on bug 17427 does not require a datatype change (sessions.a_session is still longtext). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |resetka.bedi@gmail.com --- Comment #41 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- *** Bug 28517 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #42 from Andrew Nugged <nugged@gmail.com> --- Thought on swimming 4K, thought on walking. Such idea: what if we will create own CGI::Session::Serialize::yamlxs and we're good to go then with all for now? Proof of concept: https://github.com/nugged/Koha/commit/2c62d311fba86576321337f2596283300013dd... in: https://github.com/nugged/Koha/commits/cgi_session_serialize_yamlxs I there created "CGI::Session::Serialize::yamlxs" package just "inside" of C4::Auth file, to show that solution. Jonathan and Dave: and voila, we might have YAML::XS now for sessions! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #43 from Andrew Nugged <nugged@gmail.com> --- Thought on swimming 4K, thought on walking. Such idea: what if we will create own CGI::Session::Serialize::yamlxs and we're good to go then with all for now? Proof of concept: https://github.com/nugged/Koha/commit/2c62d311fba86576321337f2596283300013dd... in: https://github.com/nugged/Koha/commits/cgi_session_serialize_yamlxs I there created "CGI::Session::Serialize::yamlxs" package just "inside" of C4::Auth file, to show that solution. Jonathan and David: and voila, we might have YAML::XS now for sessions! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #44 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121637 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121637&action=edit Bug 28489: Add selenium tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #45 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Andrew, Yes, that could work as well. I forgot this possibility! I've written some selenium tests to help us testing the different patches/approach. I am running into the same problem I faced with Data::Session and using the file driver: YAML::XS::Load Error: The problem: control characters are not allowed was found at document: 0 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17427 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427 [Bug 17427] Replace CGI::Session with Data::Session -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121637|0 |1 is obsolete| | --- Comment #46 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121638 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121638&action=edit Bug 28489: Add selenium tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #47 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- And those tests are passing on 20.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121624|0 |1 is obsolete| | --- Comment #48 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121639&action=edit Bug 28489: POD - CGI::Session::Serialize::yamlxs for CGI::Session -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #49 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121640&action=edit Bug 28489: Don't deal with encoding during the serialization -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #50 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Looks like there is a 100% working solution using longblob and removing the encode/decode from the YAML::XS serializer. Asking for a SO now, but we will need to provide a better solution to embed the serializer code (having it in C4::Auth is not nice). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #51 from Andrew Nugged <nugged@gmail.com> --- We discussed with Jonathan about "where better to place the file" but we both agreed (JD, you say) so for a moment we can keep the package in C4/Atuh as additional one for quick-est fix so we can provide working solution for backporting, but the question still open to decide for later (let's create a separate ticket after we accept this for not to forget, like TODO?): of course it's better to keep CGI::Session::Serialize::yamlxs in own file/path, .../CGI/Session/Serialize/yamlxs.pm but that pollutes Koha lib folder - Jonathan said he keeps in mind to create something separate, but that for later discussion. So, mates, for now – let's decide do we accept this 'yamlxs' serializer solution as a temporary but the full fix for this problem and backport, and keep development in master later towards whatever planned (JD said target is Data::Session). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #52 from Andrew Nugged <nugged@gmail.com> --- Jonathan, should we obsolete the first old two patches? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #53 from Andrew Nugged <nugged@gmail.com> --- Also, for me after you, Jonathan, removed encoders, I got this error: YAML::XS::Load Error: The problem:: /home/vagrant/kohaclone/mainpage.pl : /home/vagrant/kohaclone/mainpage.pl invalid trailing UTF-8 octet: /home/vagrant/kohaclone/mainpage.pl : /home/vagrant/kohaclone/mainpage.pl was found at document: 0: /home/vagrant/kohaclone/mainpage.pl but with "Encode::decode_utf8(YAML::XS::Dump($data));" so on as it was on beginning – it works. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #54 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- It works for me with longblob (so with all the patches attached on this bug report). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #55 from Andrew Nugged <nugged@gmail.com> --- ah, right. Longblob, not longtext, my bad then, then yes, it should work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #56 from David Cook <dcook@prosentient.com.au> --- (In reply to Andrew Nugged from comment #51)
We discussed with Jonathan about "where better to place the file" but we both agreed (JD, you say) so for a moment we can keep the package in C4/Atuh as additional one for quick-est fix so we can provide working solution for backporting,
but the question still open to decide for later (let's create a separate ticket after we accept this for not to forget, like TODO?): of course it's better to keep CGI::Session::Serialize::yamlxs in own file/path, .../CGI/Session/Serialize/yamlxs.pm but that pollutes Koha lib folder - Jonathan said he keeps in mind to create something separate, but that for later discussion.
Please no. This is how we get into trouble in Koha. We don't need more technical debt. The quickest fix is to revert Bug 28317, and to do this right. But I'll look at putting together a patch so that we can avoid this horror. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #57 from David Cook <dcook@prosentient.com.au> --- The database upgrade patch breaks the web installer. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #58 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #57)
The database upgrade patch breaks the web installer.
Actually, maybe something else is going on. I'll see what's up... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #59 from David Cook <dcook@prosentient.com.au> --- Created attachment 121648 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121648&action=edit Bug 28489: Put CGI::Session::Serialize::yamlxs in lib directory This patch adds a "lib" directory to the source tree which gets mapped to the same directory as "C4" and "Koha" for single and standard installations. CGI::Session::Serialize::yamlxs is put into this "lib" directory. This patch also includes some changes so that dev/git installations work as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #60 from David Cook <dcook@prosentient.com.au> --- Dev test plan: 1. vi /etc/apache2/sites-enabled/kohadev.conf 2. Change "SetEnv PERL5LIB "/kohadevbox/koha" to SetEnv PERL5LIB "/kohadevbox/koha:/kohadevbox/koha/lib" 2b. service apache2 reload 3. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/koha-functions.sh 4. koha-plack --restart kohadev 5. Log into http://localhost:8081/cgi-bin/koha/mainpage.pl 6. Go to CGI script http://localhost:8081/cgi-bin/koha/tools/export.pl (Note that this is still run in CGI even when using Plack) NOTE: We'll need to update koha-gitify (https://gitlab.com/koha-community/koha-gitify) to get that Apache configuration. There's no harm in updating it, since this is a backwards compatible change. See https://gitlab.com/koha-community/koha-gitify/-/merge_requests/2. -- Deploy test plan: Dev: 1. perl Makefile.PL 1a. Installation mode: dev 1b. Configuration directory: /opt/koha-dev 2. make 3. ls blib/PERL_MODULE_DIR/ 4. Note the following: C4 CGI cpanfile Koha Koha.pm 5. make install 5b. Note the output says the following: In order to use Koha's command-line batch jobs, you should set the following environment variables: export KOHA_CONF=/opt/koha-dev/etc/koha-conf.xml export PERL5LIB=/kohadevbox/koha:/kohadevbox/koha/lib 6. vi /opt/koha-dev/etc/koha-httpd.conf 7. Note the following: SetEnv PERL5LIB "/kohadevbox/koha:/kohadevbox/koha/lib" 6. rm -rf /opt/koha-dev 7. make clean Single: 1. perl Makefile.PL 1a. Installation mode: single 1b. Please specify the directory in which to install Koha: /opt/koha 2. make 3. ls blib/PERL_MODULE_DIR/ 4. Note the following: C4 CGI cpanfile Koha Koha.pm 5. make install 5b. Note the output says the following: In order to use Koha's command-line batch jobs, you should set the following environment variables: export KOHA_CONF=/opt/koha/etc/koha-conf.xml export PERL5LIB=/opt/koha/lib 6. ls /opt/koha/lib 7. Note the following: C4 CGI cpanfile Koha Koha.pm 8. vi /opt/koha/etc/koha-httpd.conf 9. Note the following: SetEnv PERL5LIB "/opt/koha/lib" 10. rm -rf /opt/koha 11. make clean Standard: 1. perl Makefile.PL 1a. accept all the defaults 2. make 3. ls blib/PERL_MODULE_DIR/ 4. Note the following: C4 CGI cpanfile Koha Koha.pm 5. make install 5b. Note there is a set_koha_ownership failure because of a missing "koha" user, but that's OK since this is an overly intensive process within koha-testing-docker anyway, and the install has already succeeded at this point. 6. ls /usr/share/koha/lib 7. Note the following: C4 CGI cpanfile Koha Koha.pm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #61 from David Cook <dcook@prosentient.com.au> --- An alternative to my patch would be to create a "PERL_MODULE_LOCAL_DIR" target/dirmap entry/token, and we could use "local_lib" or something like that. Another idea would be to keep PERL_MODULE_DIR as a target/dirmap, but change the token used in etc/misc files to something like "__PERL5LIB_DIRS__". I think that would be more labour intensive though. That said... it looks like "backend_directory" will be broken in etc/koha-conf.xml and misc/bin/sip_run.sh will be broken with my proposed dev install atm... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #62 from David Cook <dcook@prosentient.com.au> --- I really dislike this whole session mess but... I'll move my follow-up to a separate ticket, as it is blowing out a bit... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28519 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28519 [Bug 28519] Add a 2nd directory for Perl modules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121648|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> 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=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121584|0 |1 is obsolete| | --- Comment #63 from David Cook <dcook@prosentient.com.au> --- Created attachment 121650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121650&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This column contains serialized data, it should be a blob. And it fixes encoding issues. Test plan: 1. Apply patch and run updatedatabase 2. In $KOHA_CONF make sure that you have <strict_sql_modes>0</strict_sql_modes> 3. Create 2 libraries: a. TESTÄ/Testä b. TEST✓/Test✓ 4. Go to the staff interface, change your library to Testä, then navigate to a few other pages, make sure there is no encoding problem with the library name in the top right corner 5. Do the same with Test✓ Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121585|0 |1 is obsolete| | --- Comment #64 from David Cook <dcook@prosentient.com.au> --- Created attachment 121651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121651&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob (kohastructure.sql) Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121638|0 |1 is obsolete| | --- Comment #65 from David Cook <dcook@prosentient.com.au> --- Created attachment 121652 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121652&action=edit Bug 28489: Add selenium tests Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121639|0 |1 is obsolete| | --- Comment #66 from David Cook <dcook@prosentient.com.au> --- Created attachment 121653 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121653&action=edit Bug 28489: POD - CGI::Session::Serialize::yamlxs for CGI::Session Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121640|0 |1 is obsolete| | --- Comment #67 from David Cook <dcook@prosentient.com.au> --- Created attachment 121654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121654&action=edit Bug 28489: Don't deal with encoding during the serialization Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #68 from David Cook <dcook@prosentient.com.au> --- I don't like the hack of putting CGI::Session::Serialize::yamlxs, but signing off anyway - with the assumption that we'll also push Bug 28519 before doing a stable release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|17427 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427 [Bug 17427] Replace CGI::Session with Data::Session -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #69 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Forget my comment 24 stuff. Just tried test 1 on a sandbox and a local master and it fails. I will open a ticket. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 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=28489 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121650|0 |1 is obsolete| | --- Comment #70 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121831&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This column contains serialized data, it should be a blob. And it fixes encoding issues. Test plan: 1. Apply patch and run updatedatabase 2. In $KOHA_CONF make sure that you have <strict_sql_modes>0</strict_sql_modes> 3. Create 2 libraries: a. TESTÄ/Testä b. TEST✓/Test✓ 4. Go to the staff interface, change your library to Testä, then navigate to a few other pages, make sure there is no encoding problem with the library name in the top right corner 5. Do the same with Test✓ Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121651|0 |1 is obsolete| | --- Comment #71 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121832 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121832&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob (kohastructure.sql) Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121652|0 |1 is obsolete| | --- Comment #72 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121833&action=edit Bug 28489: Add selenium tests Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121653|0 |1 is obsolete| | --- Comment #73 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121834 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121834&action=edit Bug 28489: POD - CGI::Session::Serialize::yamlxs for CGI::Session Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121654|0 |1 is obsolete| | --- Comment #74 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121835&action=edit Bug 28489: Don't deal with encoding during the serialization Signed-off-by: David Cook <dcook@prosentient.com.au> 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=28489 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #75 from Nick Clemens <nick@bywatersolutions.com> --- Note: The libraries added in the selenium tests are not removed during cleanup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121831|0 |1 is obsolete| | Attachment #121832|0 |1 is obsolete| | Attachment #121833|0 |1 is obsolete| | Attachment #121834|0 |1 is obsolete| | Attachment #121835|0 |1 is obsolete| | --- Comment #76 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121848 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121848&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob This column contains serialized data, it should be a blob. And it fixes encoding issues. Test plan: 1. Apply patch and run updatedatabase 2. In $KOHA_CONF make sure that you have <strict_sql_modes>0</strict_sql_modes> 3. Create 2 libraries: a. TESTÄ/Testä b. TEST✓/Test✓ 4. Go to the staff interface, change your library to Testä, then navigate to a few other pages, make sure there is no encoding problem with the library name in the top right corner 5. Do the same with Test✓ Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> 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=28489 --- Comment #77 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121849 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121849&action=edit Bug 28489: Modify sessions.a_session from longtext to longblob (kohastructure.sql) Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> 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=28489 --- Comment #78 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121850 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121850&action=edit Bug 28489: Add selenium tests Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> JD amended patch: Remove libraries the tests created -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 --- Comment #79 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121851 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121851&action=edit Bug 28489: POD - CGI::Session::Serialize::yamlxs for CGI::Session Signed-off-by: David Cook <dcook@prosentient.com.au> 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=28489 --- Comment #80 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 121852 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121852&action=edit Bug 28489: Don't deal with encoding during the serialization Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Nick Clemens <nick@bywatersolutions.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=28489 --- Comment #81 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Victor Grousset/tuxayo from comment #69)
Forget my comment 24 stuff. Just tried test 1 on a sandbox and a local master and it fails. I will open a ticket.
bug 28560 That's still a mystery that here I was to only one to trigger it. The same mystery should happen in the above bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.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=28489 --- Comment #82 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Version(s)|21.11.00 |21.11.00,21.05.01 released in| | Status|Pushed to master |Pushed to stable --- Comment #83 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28489 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED CC| |fridolin.somers@biblibre.co | |m --- Comment #84 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 28317 not in 20.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org