Nodebb: Ban times are inacurate

Created on 14 Jul 2017  路  4Comments  路  Source: NodeBB/NodeBB

  • NodeBB version: Replicated on 1.4.6-1.5.x
  • NodeBB git hash: 956df9d7d7677e313b7f11c848be5e7b772327d7
  • Database type: redis
  • Database version: 3.0.6
  • Exact steps to cause this issue: Ban someone for 0.5 hours
  • What you expected:
    It to ban the person for 0.5 hours
  • What happened instead:
    It permanently bans them

Perhaps it'd be better to just use a time and date input instead, it'd be more mobile friendly as well.

bug

Most helpful comment

When this is being fixed:

The modal should (imo) default to permanent ban instead of temporary

Perhaps it'd be better to just use a time and date input instead,

:+1:

All 4 comments

Exact steps to cause this issue: Ban someone for 0.5 minutes
What you expected: It to ban the person for 0.5 hours

If I attempted to ban someone for 0.5 minutes, I'd expect them to be banned for 0.5 minutes, not 0.5 hours.

Nevertheless, this looks like either a rounding (down) issue, or the field is being interpreted as an integer and ignoring everything after, and including, the decimal point.

What happens if you try to ban them for 1.5 minutes?

Oops, I meant hours. There isn't actually a way to do minutes except for fractions of an hour. 1.5 hours seems to function properly however.

This is because we use parseInt on the server side because Redis only supports strings, and we support Redis.

When this is being fixed:

The modal should (imo) default to permanent ban instead of temporary

Perhaps it'd be better to just use a time and date input instead,

:+1:

Was this page helpful?
0 / 5 - 0 ratings