Update validators and filter to remove strings that contain only

whitespace

The validator ListItemRequired() was only checking for None and an empty
string, not for strings that were multiple whitespace characters. This
fixes this issue by checking each item with regex to make sure it
contains non whitespace characters

The filter remove_empty_string() also was not checking for strings that
were multiple whitespace characters. This was also fixed by using regex
tomake sure that the string contains non whitespace characters, and also
clips any trailing whitespace.
This commit is contained in:
leigh-mil
2019-11-07 11:25:18 -05:00
parent 045e06abee
commit ab9b62f54b
7 changed files with 60 additions and 20 deletions

View File

@@ -3,7 +3,7 @@
"files": "^.secrets.baseline$|^.*pgsslrootcert.yml$",
"lines": null
},
"generated_at": "2019-11-01T18:50:54Z",
"generated_at": "2019-11-06T21:35:23Z",
"plugins_used": [
{
"base64_limit": 4.5,
@@ -170,15 +170,6 @@
"type": "Private Key"
}
],
"tests/forms/test_validators.py": [
{
"hashed_secret": "260408f687da9094705a841acda9b029563053ee",
"is_secret": false,
"is_verified": false,
"line_number": 30,
"type": "Hex High Entropy String"
}
],
"tests/routes/task_orders/test_new.py": [
{
"hashed_secret": "e4f14805dfd1e6af030359090c535e149e6b4207",