Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about the TZ environment variable and soundness #1259

Closed
wants to merge 1 commit into from

Conversation

pitdicker
Copy link
Collaborator

@pitdicker pitdicker commented Sep 6, 2023

I think we should say something about this in the docs because it has been a security issue that received a lot of attention, and affected a lot of dependencies.

Alternative to #626.

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #1259 (4631889) into 0.4.x (84334df) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            0.4.x    #1259   +/-   ##
=======================================
  Coverage   91.37%   91.37%           
=======================================
  Files          37       37           
  Lines       16448    16448           
=======================================
  Hits        15030    15030           
  Misses       1418     1418           
Files Changed Coverage Δ
src/lib.rs 95.58% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

src/lib.rs Outdated
//! More importantly POSIX declares modifying the environment in a multi-threaded process as unsafe
//! (see [rust#27970] for more discussion).
//!
//! Since version 4.20 chrono no longer uses `localtime_r` but has a pure-rust solution. So when
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can expand on this a little bit? uses Rust code to query the operating system timezone (via iana-time-zone) and timezone data (DST transitions).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave it a second try. A bit different though, because iana-time-zone is only used as fallback and the time zone data is much more than DST transitions.

@pitdicker
Copy link
Collaborator Author

Now that similar information is included in lib.rs in #1246 I merged it with that one.

@pitdicker pitdicker closed this Sep 6, 2023
@pitdicker pitdicker deleted the tz_env_soundness_doc branch September 6, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants