Project

General

Profile

Tâche #11480

creole - Scénario #16098: Améliorer la validation des adresses IP/masque de sous-réseau dans Creole/Tiramisu

La validation actuelle du type "ip" n'est pas assez restrictive

Added by Joël Cuissinat over 8 years ago. Updated over 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
05/04/2015
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Remaining (hours):
0.0

Description

Actuellement, il est possible de saisir un entier ou une adresse IP incomplète car "IPy" complète avec des "0" :

>>> import IPy
>>> IPy.IP('{0}/32'.format("1.1"))
IP('1.1.0.0')

Peut-être faudrait-il renforcer la validation actuelle en testant la présence des 3 points ?

Associated revisions

Revision 1c018102 (diff)
Added by Joël Cuissinat over 7 years ago

Test unitaire vérifiant la validation des IP saisies

Ref: #12858 @30m
Ref: #11480

Revision 6eb76f84
Added by Joël Cuissinat over 7 years ago

Merge remote-tracking branch 'lab/master'

Ref: #12858
Ref: #11480

Revision 24bb5b7e (diff)
Added by Lionel Morin over 7 years ago

Correction numéro de demande dans les commentaires (ref #11480 + ref #12858)

History

#1 Updated by Joël Cuissinat almost 8 years ago

  • Tracker changed from Anomalie to Tâche
  • Estimated time set to 2.00 h
  • Remaining (hours) set to 2.0

A traiter en même temps que #12858.

#2 Updated by Joël Cuissinat almost 8 years ago

  • Parent task set to #13918

#3 Updated by Joël Cuissinat over 7 years ago

  • Parent task changed from #13918 to #16098

#4 Updated by Joël Cuissinat over 7 years ago

  • Status changed from Nouveau to En cours

#5 Updated by Joël Cuissinat over 7 years ago

Toujours d'actualité pour les types "ip" et "network".

Netmask aussi en fait mais il faut réfléchir pour contourner le test de cohérence ip/mask :

root@scribe:~# CreoleGet netmask_admin_eth0 
255.255.255
root@scribe:~# CreoleGet ip_admin_eth0 
1.1.1.0

#6 Updated by Joël Cuissinat over 7 years ago

  • Assigned To set to Joël Cuissinat
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 2.0 to 0.5

Cf. patch proposé dans #12858

#7 Updated by Joël Cuissinat over 7 years ago

  • Status changed from En cours to Résolu

#8 Updated by Joël Cuissinat over 7 years ago

  • Description updated (diff)
  • Remaining (hours) changed from 0.5 to 0.15

#9 Updated by Lionel Morin over 7 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.15 to 0.0

Application des tests unitaires => OK

Also available in: Atom PDF