Project

General

Profile

Bug #15548

cookie de domaine vs SERVER_NAME = 'localhost'

Added by Frédéric Péters over 2 years ago. Updated about 1 year ago.

Status:
Fermé
Priority:
Bas
Target version:
Start date:
22 Mar 2017
Due date:
% Done:

100%

Patch proposed:
Yes
Planning:
No

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").

0001-middleware-improve-condition-to-automatically-determ.patch View (1.41 KB) Benjamin Dauvergne, 27 Sep 2017 02:37 PM

Associated revisions

Revision 688067f2 (diff)
Added by Benjamin Dauvergne about 2 years ago

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.

History

#1 Updated by Benjamin Dauvergne about 2 years ago

#2 Updated by Thomas Noël about 2 years ago

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.

#3 Updated by Benjamin Dauvergne about 2 years ago

  • Status changed from Nouveau to Résolu (à déployer)
  • % Done changed from 0 to 100

#4 Updated by Benjamin Dauvergne almost 2 years ago

  • Target version set to 1.2.34

#5 Updated by Benjamin Dauvergne almost 2 years ago

  • Assignee set to Benjamin Dauvergne

#6 Updated by Benjamin Dauvergne about 1 year ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF