Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

RDS auth tokens and presigned URLs get an expiry one hour too long during the autumn DST change

オープン
#3,392 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
api, backend

調査の方向性

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 の本文から書いたものです。

説明

bug investigating p2
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 gets X-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 as S3Client::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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/aws-sdk-php のほかの issue

aws/aws-sdk-php の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。