php / php/php-src

Phar timestamp is 32-bit

Open
#14,141 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Extension: phar Status: Verified
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

From the definition of the entry info:

typedef struct _phar_entry_info {
	/* first bytes are exactly as in file */
	uint32_t                 uncompressed_filesize;
	uint32_t                 timestamp;

We can see that the timestamp is 32-bit... This will give problems in the near future and we should audit Phar's code such that this issue is gone. This might also imply changes to the file format.

PHP Version

All

Operating System

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the _phar_entry_info definition shown in the issue and audit the Phar code paths that use its timestamp field. Done means the 32-bit timestamp limitation and any required file-format changes are addressed across Phar.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.