From d394c688b6764912956979398d63bfd2553886c5 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Fri, 8 May 2015 19:06:38 +0200 Subject: [PATCH] =?UTF-8?q?Pour=20federez=20wifi,=20on=20enl=C3=A8ve=20le?= =?UTF-8?q?=20suffixe=20@....?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freeradius/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freeradius/auth.py b/freeradius/auth.py index f8451c46..03735722 100644 --- a/freeradius/auth.py +++ b/freeradius/auth.py @@ -133,6 +133,9 @@ def get_machines(data, conn, is_wifi=True, proprio=None): mac = None username = data.get('User-Name', None) if username: + # Pour les requètes venant de federezwifi + username = username.split('@', 1)[0] + username = escape_ldap(username.decode('ascii', 'ignore')) if username.endswith(suffix): username = username[:-len(suffix)]