fix(sdks): handle signed URL expiration edge cases in upload/download URLs#1429
Conversation
… URLs Python now raises InvalidArgumentException when use_signature_expiration is passed for an unsecured sandbox, matching JS behavior (which now throws InvalidArgumentError instead of a plain Error). A signature expiration of 0 now produces an immediately expiring URL instead of silently creating a never-expiring one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 996f4ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PR SummaryMedium Risk Overview Unsecured sandboxes: Passing Zero expiration: Signature helpers now treat Adds mirrored unit tests in Reviewed by Cursor Bugbot for commit 996f4ed. Bugbot is set up for automated code reviews on this repo. Configure here. |
Package ArtifactsBuilt from 8625e72. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.29.2-mishushakov-fix-signed-url-expiration.0.tgzCLI ( npm install ./e2b-cli-2.11.2-mishushakov-fix-signed-url-expiration.0.tgzPython SDK ( pip install ./e2b-2.28.2+mishushakov.fix.signed.url.expiration-py3-none-any.whl |
Summary
upload_url/download_urlnow raiseInvalidArgumentExceptionwhenuse_signature_expirationis passed for an unsecured sandbox, matching the JS SDK (which now throwsInvalidArgumentErrorinstead of a plainError).0was treated as falsy and silently produced a never-expiring signed URL; it now produces an immediately expiring URL in both SDKs.tests/sandbox/urls.test.ts↔tests/test_sandbox_urls.py) plus a changeset.Usage
🤖 Generated with Claude Code