RDS auth tokens and presigned URLs get an expiry one hour too long during the autumn DST change
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading SignatureV4::convertToTimestamp() and its timestamp parsing tests; the issue identifies this method and provides a reproducible case in Europe/Berlin. Check how relative expiries are converted around the autumn DST transition, then verify that '+15 minutes' produces X-Amz-Expires=900 while other expiry forms retain their behavior.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
A relative expiry like '+15 minutes' gives a presigned URL that is valid one hour too long when the default timezone has a daylight saving time (DST) change and the expiry falls into the repeated hour.
SignatureV4::convertToTimestamp() resolves the string with strtotime($value, $start) in the default timezone. strtotime() adds hours, minutes and seconds as wall-clock time. On the autumn change the wall-clock result exists twice, and PHP picks the later one (standard time). The SDK uses relative expiries itself, so this affects:
Aws\Rds\AuthTokenGenerator::createToken()('+15 minutes'): the token getsX-Amz-Expires=4500. RDS and RDS Proxy refuse it, and every IAM database login fails for 75 minutes (1045 Access denied … (using password: NO)).Aws\DSQL\AuthTokenGenerator,PollyClient::createSynthesizeSpeechPreSignedUrl()('+15 minutes'),PresignUrlMiddleware('+1 hour'), and every user call such asS3Client::createPresignedRequest($cmd, '+20 minutes').
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
'+15 minutes' gives X-Amz-Expires=900 at any time of the year.
Current Behavior
From 01:45 to 02:59:59 local summer time on the night of the autumn change (Europe/Berlin: 2026-10-24T23:45Z to 2026-10-25T00:59:59Z), X-Amz-Expires=4500. America/New_York has the same problem on 2026-11-01 ('+20 minutes' at 01:50 EDT gives 4800).
Reproduction Steps
date_default_timezone_set('Europe/Berlin');
$now = strtotime('2026-10-24T23:45:00Z'); // 01:45 CEST
var_dump(strtotime('+15 minutes', $now) - $now); // int(4500), expected 900
$signer = new Aws\Signature\SignatureV4('rds-db', 'eu-central-1');
$request = new GuzzleHttp\Psr7\Request('GET', 'https://db.example:3306/?Action=connect&DBUser=app');
$url = (string) $signer->presign(
$request,
new Aws\Credentials\Credentials('AKID', 'SECRET'),
'+15 minutes',
['start_time' => $now]
)->getUri();
// $url contains X-Amz-Expires=4500
Possible Solution
In convertToTimestamp(), detect with date_parse() a value that is only a relative time of hours, minutes, seconds or smaller units, and add it in UTC ((new DateTimeImmutable('@' . $base))->modify($value)), where there is no DST. Keep strtotime() for all other values, so absolute dates and day-based offsets do not change. PR: (link follows)
Additional Information/Context
The spring change is not affected. Related: #1660 (one-week expiry in America/New_York).
SDK version used
3.402.0, and current master
Environment details (Version of PHP (php -v)? OS name and version, etc.)
PHP 8.5.12, date.timezone = Europe/Berlin, Linux container on AWS ECS. Reproduced on PHP 8.2, 8.3, 8.4 and 8.5.
This issue was generated by AI tools (Claude Code) and reviewed by Sebastian Detert.
- 主要言語
- PHP
- スター
- 6.2k
- フォーク
- 1.3k
- 平均マージ
- 3日 18時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/aws-sdk-php のほかの issue
-
Feature Request: Implement `__debugInfo()` on `Aws\Command` to prevent massive `var_dump` / log output対応中かも @stobrien89 が 4 日前に担当しました。 オープンfeature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/aws-sdk-php#3365 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug p2 queued service-api
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
aws/aws-sdk-php#3395 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
The SDK now requires PHP 8.2 or later対応中かも @stobrien89 が 8 日前に担当しました。 オープンannouncement SECURITY
aws/aws-sdk-php#3385 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
feature-request p3
難易度 3/5 半日 初心者へのやさしさ 45/100
aws/aws-sdk-php#3377 ·
メンテナーはふだん 1 日以内に返信
-
announcement
難易度 4/5 3〜5日 初心者へのやさしさ 12/100
aws/aws-sdk-php#3369 ·
メンテナーはふだん 1 日以内に返信
aws/aws-sdk-php の issue をすべて見る
似ている issue
-
14.3.x
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
CMS video element: "CmsVideoPlugin" sets `volume = 0`, so videos cannot be unmuted on Android Chromeオープンneeds-triage Platform(Default)
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
PrestaShop/ps_googleanalytics#187 ·
-
GD decoder discards the finfo media type in mediaTypeByBinary() since 4.4.0対応中かも @lazerg が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Intervention/image#1556 ·
メンテナーはふだん 1 日以内に返信