Bug #15548
cookie de domaine vs SERVER_NAME = 'localhost'
Début:
22 mars 2017
Echéance:
% réalisé:
100%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
common_domain = app_settings.OPENED_SESSION_COOKIE_DOMAIN if not common_domain: common_domain = request.META['SERVER_NAME'].split('.', 1)[1]
Ça explose quand SERVER_NAME vaut "localhost" (ou autre nom "simple").
Fichiers
Révisions associées
Historique
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Fichier 0001-middleware-improve-condition-to-automatically-determ.patch 0001-middleware-improve-condition-to-automatically-determ.patch ajouté
- Patch proposed changé de Non à Oui
Mis à jour par Thomas Noël il y a plus de 6 ans
Ack
à lire la doc sur ALLOWED_HOSTS qui est par défaut ['localhost', '127.0.0.1', '[::1]'] je me dis que les ipv6 sont peut-être rendues au format [truc] mais j'ai la flemme de vérifier.
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Statut changé de Nouveau à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit django-mellon|688067f27068f6c0450d76f67c71b7419db78138.
Mis à jour par Benjamin Dauvergne il y a plus de 5 ans
- Statut changé de Résolu (à déployer) à Fermé
middleware: improve condition to automatically determine a common domain (fixes #15548)
It works if:
- HTTP Host is a domain name and not an IP address (IPv6 address will not pass
this test, they lack dots),
- domain contains at least three components.