Project

General

Profile

Development #58055

avoir une fonction @dnsbl(remote_addr, dnsbl_domain)@ pour vérifier si une adresse fait partie d'une liste d'IP

Added by Benjamin Dauvergne about 1 month ago. Updated 4 days ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
21 Oct 2021
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

À utiliser dans les conditions sur les modes d'authentification.


Files

Associated revisions

Revision 56787fb2 (diff)
Added by Benjamin Dauvergne 5 days ago

utils/evaluate: allow some calls in expressions (#58055)

Revision cb68c2ca (diff)
Added by Benjamin Dauvergne 5 days ago

utils/evaluate: add a dnsbl() dict like (#58055)

To check an IPv4 address is inside a DNSxL, use the following
expression in your condition:

remote_addr in dnsbl('dnsbl.example.com')

Revision 186f8235 (diff)
Added by Benjamin Dauvergne 5 days ago

auth: inject dnsbl function in condition evaluation context (#58055)

History

#2

Updated by Benjamin Dauvergne about 1 month ago

  • Assignee set to Benjamin Dauvergne
#4

Updated by Thomas Noël 5 days ago

Dans les tests je n'ai pas bien saisi si l'erreur de frappe "reomte" était voulue dans :

                '0': 'remote_addr in dnsbl(\'dnswl.example.com\')',
                '1': 'reomte_addr not in dnsbl(\'dnswl.example.com\')',    <-- ici

#6

Updated by Thomas Noël 5 days ago

  • Status changed from Solution proposée to Solution validée

Hé bien cette fois c'est ok pour moi.

#7

Updated by Benjamin Dauvergne 5 days ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 186f823529a77392af726bc25eacf553b12f1b4f
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Oct 21 18:40:27 2021 +0200

    auth: inject dnsbl function in condition evaluation context (#58055)

commit cb68c2ca3867458df0df79b31d7accb3cf3b295d
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Oct 21 17:53:12 2021 +0200

    utils/evaluate: add a dnsbl() dict like (#58055)

    To check an IPv4 address is inside a DNSxL, use the following
    expression in your condition:

        remote_addr in dnsbl('dnsbl.example.com')

commit 56787fb29c9bec377d3482f3d5157a05a92735bd
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Oct 21 17:50:52 2021 +0200

    utils/evaluate: allow some calls in expressions (#58055)
#8

Updated by Frédéric Péters (absent jusqu’au 12/12) 4 days ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF