Skip to content

Ignore SECURITY file when scanning timezones #134

@Rdx31

Description

@Rdx31

Problem:

The Arch Linux core package tzdata adds a SECURITY file in /usr/share/tzinfo since tzdata version 2021c-1.

This file is basically a note to report security-related bugs to the right person:

Please report any sensitive security-related bugs via email to the
tzdb designated coordinators, currently Paul Eggert
<[email protected]> and Tim Parenti <[email protected]>.
Put "tzdb security" at the start of your email's subject line.
We prefer communications to be in English.

[...]

tzinfo wants to use this file, which leads to an error.

How to reproduce:

Using Ruby IRB:

>> require 'tzinfo'
=> true
>> TZInfo::Timezone.all.find_all {|tz| tz.current_period.abbreviation == :some_abbrev }
TZInfo::InvalidTimezoneIdentifier (The file '/usr/share/zoneinfo/SECURITY' does not start with the expected header. (loading SECURITY))

Information:

tool version
ruby 2.6.2p47
tzinfo 2.0.4
tzdata 2021c-1 and above
linux kernel 5.18.10-arch1-1

Fix:

I propose this PR to exclude the SECURITY file from beeing used by tzinfo.

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