What happens: The fee() method in lib/baza-rb.rb (lines 457–458) checks that job is not nil and is an Integer, but does not check that it is positive. Calling baza.fee('unknown', 1.0, 'test', -1) passes local validation and sends a negative job ID to the server.
What should happen: fee() should raise an error when job is not positive, consistent with the transfer() method (line 432) which validates unless job.positive?.
What happens: The
fee()method inlib/baza-rb.rb(lines 457–458) checks thatjobis notniland is anInteger, but does not check that it is positive. Callingbaza.fee('unknown', 1.0, 'test', -1)passes local validation and sends a negative job ID to the server.What should happen:
fee()should raise an error whenjobis not positive, consistent with thetransfer()method (line 432) which validatesunless job.positive?.