Project

General

Profile

Bug #15548

cookie de domaine vs SERVER_NAME = 'localhost'

Added by Frédéric Péters about 6 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Patch proposed:
Yes
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").


Files

Associated revisions

Revision 688067f2 (diff)
Added by Benjamin Dauvergne over 5 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

#2

Updated by Thomas Noël over 5 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 over 5 years ago

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

Updated by Benjamin Dauvergne about 5 years ago

  • Target version set to 1.2.34
#5

Updated by Benjamin Dauvergne about 5 years ago

  • Assignee set to Benjamin Dauvergne
#6

Updated by Benjamin Dauvergne over 4 years ago

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

Also available in: Atom PDF