Project

General

Profile

Anomalie #799

Galette n'est pas compatible IPv6

Added by Raphaël Hertzog over 7 years ago. Updated over 7 years ago.

Status:
Fermé
Priority:
Urgent
Category:
Database
Target version:
Start date:
03/12/2014
Due date:
% Done:

100%

Estimated time:
Version utilisée:
Vote:

Description

On a récemment activé l'IPv6 sur france.debian.net et j'ai constaté que certaines opérations ne fonctionnaient plus (l'enregistrement d'une contribution dans mon cas), après investigation le problème vient du champs ip_log de la table galette_logs qui avec 30 caractères ne permet pas d'enregistrer une adresse IPv6 qui peut en faire jusqu'à 39 caractères...

Après modification de la structure de la table tout est rentré dans l'ordre:
ALTER TABLE galette_logs ALTER ip_log TYPE varchar(40);

Voici les logs qui m'ont permis de diagnostiquer cela:
2001:4b98:dc0:43:216:3eff:fec5:ef60 - 2014-03-12 14:18:04 - 4 - PHP Warning: Variable passed to each() is not an array or object in /usr/share/galette/lib/Galette/Entity/DynamicFields.php on line 438
2001:4b98:dc0:43:216:3eff:fec5:ef60 - 2014-03-12 14:18:04 - 3 - An error occured trying to add log entry. SQLSTATE22001: String data, right truncated: 7 ERROR: value too long for type character varying(30)
2001:4b98:dc0:43:216:3eff:fec5:ef60 - 2014-03-12 14:18:04 - 3 - An error occured trying to retrieve member's due date
2001:4b98:dc0:43:216:3eff:fec5:ef60 - 2014-03-12 14:18:04 - 3 - An error occured updating member 198's deadline |SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2001:4b98:dc0:43:216:3eff:fec5:ef60 - 2014-03-12 14:18:04 - 3 - Something went wrong :'( | An error occured updating member's deadline
#0 /usr/share/galette/ajouter_contribution.php(154): Galette\Entity\Contribution->store()
#1 {main}

Et au niveau postgresql:
2014-03-12 15:18:04 CET ERROR: value too long for type character varying(30)
2014-03-12 15:18:04 CET STATEMENT: INSERT INTO "galette_logs" ("date_log", "ip_log", "adh_log", "action_log", "text_log", "sql_log") VALUES ($1, $2, $3, $4, $5, $6)
2014-03-12 15:18:04 CET ERROR: current transaction is aborted, commands ignored until end of transaction block
2014-03-12 15:18:04 CET STATEMENT: DEALLOCATE pdo_stmt_00000016
2014-03-12 15:18:04 CET ERROR: current transaction is aborted, commands ignored until end of transaction block
2014-03-12 15:18:04 CET STATEMENT: SELECT MAX FROM "galette_cotisations" WHERE (id_adh = '198')
2014-03-12 15:18:04 CET ERROR: current transaction is aborted, commands ignored until end of transaction block
2014-03-12 15:18:04 CET STATEMENT: UPDATE "galette_adherents" SET "date_echeance" = NULL WHERE (id_adh=198)

Also available in: Atom PDF