Projet

Général

Profil

Actions

Anomalie #799

fermé

Galette n'est pas compatible IPv6

Ajouté par Raphaël Hertzog il y a environ 10 ans. Mis à jour il y a environ 10 ans.

Statut:
Fermé
Priorité:
Urgent
Assigné à:
Catégorie:
Database
Version cible:
Début:
12/03/2014
Echéance:
% réalisé:

100%

Temps estimé:
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)

Mis à jour par Raphaël Hertzog il y a environ 10 ans

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);

Mis à jour par Johan Cwiklinski il y a environ 10 ans

  • Version cible mis à 0.8.0

Mis à jour par Johan Cwiklinski il y a environ 10 ans

  • % réalisé changé de 0 à 100
  • Statut changé de Nouveau à Résolu

Mis à jour par Johan Cwiklinski il y a environ 10 ans

  • Statut changé de Résolu à Fermé
Actions

Formats disponibles : Atom PDF