Skip to content

Actix Files does not serve files with a modification date before UNIX epoch #2748

Open
@marknijboer

Description

@marknijboer

Expected Behavior

I was working with archive video footage that has its modification date set to the date it was shot. In my case a video from 1964. I expected this video to be served without any issues.

Current Behavior

A panic with this message:

thread 'actix-rt|system:0|arbiter:0' panicked at 'modification time must be after epoch: SystemTimeError(189347400s)', /cargo/registry/src/github.com-1ecc6299db9ec823/actix-files-0.6.0/src/named.rs:360:18

Steps to Reproduce (for bugs)

  1. Set the modification date of the file to a date before 1970. E.g.:
# Sets the file's modification date to 12th of February, 1964.
touch -t 196402121230 <file>
  1. Try to access that file through Actix Files as a named file.

Your Environment

actix-web = { version = "4.0", features = ["rustls"] }
actix-rt = "2.7"
actix-cors = "0.6"
actix-files = "0.6"
rustc 1.60.0 (7737e0b5c 2022-04-04)

Running in production on Ubuntu Linux (5.4.0-107-generic).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions