f5devcentral / f5-waf-policy-editor

Apache License 2.0
25 stars 14 forks source link

UI-Validation for Expiration time field in CSRF/Protection section #45

Open shubhammishra9 opened 2 years ago

shubhammishra9 commented 2 years ago

Observed no UI-validation for min and max values of 'Expiration time in seconds' field in CSRF/Protection section

Applied policy: m3

If negative value, Error Message: "error_message" : "Failed to import Policy 'myPolicy' from '/etc/app_protect/conf/waf-1633516938513.json': Could not update the CSRF 'CSRF'. Failed validating value '-120' for expirationTimeInSeconds: The value contains an illegal character (\"-\")"

Applied policy: m2

If 0, Error Message: "error_message" : "Failed to import Policy 'myPolicy' from '/etc/app_protect/conf/waf-1633516938513.json': Could not parse/validate the CSRF 'CSRF'. Illegal field value for expiration_time_in_seconds - 0, must be an \"disabled\""

Applied policy: m1

If length > 5, Error Message: "error_message" : "Failed to import Policy 'myPolicy' from '/etc/app_protect/conf/waf-1633516938513.json': Could not update the CSRF 'CSRF'. Failed validating value '100000' for expirationTimeInSeconds: The value is too long (maximum length = 5)"