RDS auth tokens and presigned URLs get an expiry one hour too long during the autumn DST change
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- PHP
- Stelle
- 6.2k
- Fork
- 1.3k
- Merge medio
- 2g 15h
- PR unite (30g)
- 15
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws/aws-sdk-php
-
Feature Request: Implement `__debugInfo()` on `Aws\Command` to prevent massive `var_dump` / log outputForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertafeature-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aws/aws-sdk-php#3365 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
The SDK now requires PHP 8.2 or laterForse già presa @stobrien89 l’ha presa 6 giorni fa. Apertaannouncement SECURITY
aws/aws-sdk-php#3385 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feature-request p3
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
aws/aws-sdk-php#3377 ·
I maintainer di solito rispondono entro 1 giorno
-
Event stream decoder drops the final event when reading it reaches EOFForse già presa @stobrien89 l’ha presa 10 giorni fa. Apertabug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 62/100
aws/aws-sdk-php#3374 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
AssumeRoleCredentialProvider replaces non-RuntimeException failures with TypeErrorForse già presa @stobrien89 l’ha presa 11 giorni fa. Apertabug pending-release
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
aws/aws-sdk-php#3370 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di aws/aws-sdk-php
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Automattic/blocks-engine#3618 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
MagnaCapax/PMSS#1206 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aimeos/aimeos-typo3#279 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno