A numeric value of 0.0 crashes the automatic Issue validator #338

Closed
rachkor opened this Issue Oct 31, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@rachkor

rachkor commented Oct 31, 2016

If you add a numeric Issue field to your Report Template properties and set the value to 0.0 within your Dradis Project, the automatic Issue validator will fail with the following error in production.log:

F, [2016-10-31T09:56:29.122833 #3228] FATAL -- :  NoMethodError (private method `warn' called for #<IssueValidator::LocalLogger:0x007fe467a6ec00>):
  app/services/issue_validator.rb:34:in `is_valid?'
  app/controllers/issues_controller.rb:188:in `validate_issue_fields'
  app/controllers/issues_controller.rb:64:in `block in update'
  app/controllers/issues_controller.rb:60:in `update'

Example:
If CVSS is set to a Numeric Issue field in the Report Template Properties and the Issue in your Dradis project contains the following content:

#[CVSS]#
0.0

When you save the Issue, you will see the generic We're sorry, but something went wrong. error page. If you navigate back to the project (e.g. /pro/issues), the changes to your Issue will be saved.

Bug originally reported by Kevin

@etdsoft

This comment has been minimized.

Show comment
Hide comment
@etdsoft

etdsoft Nov 9, 2016

Contributor

Fixed, ships in the next release.

Contributor

etdsoft commented Nov 9, 2016

Fixed, ships in the next release.

@etdsoft etdsoft closed this Nov 9, 2016

@etdsoft etdsoft added this to the v2.5 milestone Nov 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment