Skip to content

idleTimeLimit validation is too restrictive #474

@Minding000

Description

@Minding000

Pre-submission checks

  • I have searched existing issues and this bug has not been reported yet
  • This is a bug report for asciinema server (not CLI or player)

Bug Description

Setting the idleTimeLimit to anything lower than 0.5 causes the cast to be rejected when uploading to https://asciinema.org. The error message (at least when using the CLI) does not clarify why the file is rejected. When the CLI is configured with a lower idleTimeLimit (see config below), it records and plays back without issues.

In my opinion, an idleTimeLimit of 0.5 is much higher than desirable.

Steps to Reproduce

# Warning: overrides config!
cat > $HOME/.config/asciinema/config.toml <EOF
[session]
idle_time_limit = 0.25
EOF
asciinema rec test.cast
$ echo "test"
asciinema upload test.cast
> Error: HTTP status client error (422 Unprocessable Entity)
asciinema --version
> asciinema 3.2.0

Expected Behavior

I expect one of:

  • The file to be uploaded, because the validation should allow any non-negative idle_time_limit
  • The file to be uploaded, because the validation should allow a much lower idle_time_limit (e.g. up to 0.02)

And a descriptive error message informing me why my file was rejected when using the asciinema CLI

Additional Context

See validation at:

|> validate_number(:idleTimeLimit, greater_than_or_equal_to: 0.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions