Project

General

Profile

Actions

Anomalie #799

closed

Galette n'est pas compatible IPv6

Added by Raphaël Hertzog almost 11 years ago. Updated almost 11 years ago.

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

100%

Estimated time:
Version utilisée:

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)

Actions #1

Updated by Raphaël Hertzog almost 11 years ago

On me signale sur IRC:
15:59 <jcristau> buxy: pour info #define INET6_ADDRSTRLEN 46
15:59 <jcristau> t'as ptet intérêt à mettre ça plutôt que 40

Donc:
ALTER TABLE galette_logs ALTER ip_log TYPE varchar(46);

Actions #2

Updated by Johan Cwiklinski almost 11 years ago

  • Target version set to 0.8.0
Actions #3

Updated by Johan Cwiklinski almost 11 years ago

  • % Done changed from 0 to 100
  • Status changed from Nouveau to Résolu
Actions #4

Updated by Johan Cwiklinski almost 11 years ago

  • Status changed from Résolu to Fermé
Actions

Also available in: Atom PDF