Skip to content

fix: reject non-positive expires_in in signed public URLs - #1182

Merged
vdusek merged 2 commits into
masterfrom
fix-signed-url-non-positive-expiry
Nov 2, 2026
Merged

vdusek merged 2 commits into
masterfrom
fix-signed-url-non-positive-expiry

Conversation

@vdusek

@vdusek vdusek commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

create_items_public_url and create_keys_public_url (sync and async) now raise ValueError when expires_in is zero or negative. The check runs before any request. Without it, timedelta(0) produced a URL that expired immediately and a negative value one that was already expired. The JS client rejects these values too.

Relates to apify/apify-client-js#1183

✍️ Drafted by Claude Code

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Oct 30, 2026
@vdusek vdusek self-assigned this Oct 30, 2026
@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.67%. Comparing base (db1ab98) to head (31ea28f).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1182   +/-   ##
=======================================
  Coverage   95.66%   95.67%           
=======================================
  Files          61       61           
  Lines        6461     6473   +12     
=======================================
+ Hits         6181     6193   +12     
  Misses        280      280           
Flag Coverage Δ
integration 91.56% <50.00%> (+0.09%) ⬆️
unit 90.37% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
vdusek marked this pull request as ready for review October 30, 2026 07:46
@vdusek
vdusek requested a review from Pijukatel October 30, 2026 07:46
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 30, 2026

@Pijukatel Pijukatel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just mention in Args description that None means never expire

@vdusek
vdusek merged commit f6be852 into master Nov 2, 2026
34 checks passed
@vdusek
vdusek deleted the fix-signed-url-non-positive-expiry branch November 2, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants