mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 00:01:08 +01:00
Prevent the creation of 'weak' PINs.
Simple checks to prevent the same number, or sequentially increasing/decreasing PINs. e.g. 1111, 1234, 54321, etc.
This commit is contained in:
committed by
Greyson Parrelli
parent
b7296a4fe3
commit
87eab27996
62
app/src/test/resources/data/kbs_pin_validity_vectors.json
Normal file
62
app/src/test/resources/data/kbs_pin_validity_vectors.json
Normal file
@@ -0,0 +1,62 @@
|
||||
[
|
||||
{
|
||||
"name": "Empty",
|
||||
"pin": "",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"name": "Alpha",
|
||||
"pin": "abcd",
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"name": "Sequential",
|
||||
"pin": "1234",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"name": "Non-sequential",
|
||||
"pin": "6485",
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"name": "Sequential descending",
|
||||
"pin": "43210",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"name": "Sequential with space",
|
||||
"pin": "1234 ",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"name": "Non-sequential with space",
|
||||
"pin": "1236 ",
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"name": "Sequential Non-arabic digits",
|
||||
"pin": "١٢٣٤٥",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"name": "Sequential descending Non-arabic digits",
|
||||
"pin": "٥٤٣٢١",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"name": "Non-sequential Non-arabic digits",
|
||||
"pin": "١٢٣٥٤",
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"name": "All digits the same",
|
||||
"pin": "9999",
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"name": "All Non-arabic digits the same",
|
||||
"pin": "٢٢٢٢",
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user