惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
ThreatConnect
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
H
Help Net Security
T
Threat Research - Cisco Blogs
Blog — PlanetScale
Blog — PlanetScale
A
Arctic Wolf
G
Google Developers Blog
量子位
U
Unit 42
I
InfoQ
V
V2EX
F
Fox-IT International blog
P
Privacy & Cybersecurity Law Blog
V
Visual Studio Blog
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
C
CERT Recently Published Vulnerability Notes
博客园 - 三生石上(FineUI控件)
T
The Exploit Database - CXSecurity.com
T
Tailwind CSS Blog
SecWiki News
SecWiki News
Know Your Adversary
Know Your Adversary
MyScale Blog
MyScale Blog
宝玉的分享
宝玉的分享
The Hacker News
The Hacker News
Project Zero
Project Zero
Application and Cybersecurity Blog
Application and Cybersecurity Blog
月光博客
月光博客
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
GRAHAM CLULEY
C
Cisco Blogs
I
Intezer
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
Recorded Future
Recorded Future
T
Tenable Blog
W
WeLiveSecurity
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
T
The Blog of Author Tim Ferriss
www.infosecurity-magazine.com
www.infosecurity-magazine.com
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
PCI Perspectives
PCI Perspectives

Recent Commits to openclaw:main

fix: parse feishu startup timeout env strictly fix: parse feishu timeout env strictly fix: parse telegram qa timeout env strictly fix: parse qa credential integer env strictly · openclaw/openclaw@19d1c21 fix(media): compact whatsapp terminal qr (#87581) · openclaw/openclaw@492105d fix: parse qa worker stagger env strictly · openclaw/openclaw@d3b5413 fix: parse qa transport timeout env strictly · openclaw/openclaw@2e8b344 fix: parse qa process metrics strictly · openclaw/openclaw@339a74a fix: parse codex computer use timeout env strictly · openclaw/openclaw@5b79ab0 fix: parse codex migration timeout env strictly · openclaw/openclaw@929b3a4 fix: parse qa suite concurrency env strictly · openclaw/openclaw@2cde331 fix(ci): raise plugin sdk strict smoke heap (#87729) · openclaw/openclaw@5f9d71f fix: parse embedded abort settle timeout strictly · openclaw/openclaw@df4475d fix: parse sdk retry wait env strictly · openclaw/openclaw@f90e266 fix(e2e): bound OpenWebUI probe response bodies · openclaw/openclaw@bbc9a7d fix: parse queue caps strictly · openclaw/openclaw@d47eee4 fix: parse gateway usage days strictly · openclaw/openclaw@2122dcc fix: parse http idle timeout strings strictly · openclaw/openclaw@d08bcb4 fix: parse cleanup timeout env strictly · openclaw/openclaw@42688f5 fix: parse handshake timeout env strictly · openclaw/openclaw@d6c8e05 fix: parse cron stagger strings strictly · openclaw/openclaw@ca87241 fix: reject invalid cron epoch timestamps fix: parse cron task run ids strictly fix(native-hook-relay): prune stale bridge files on registration (#87… · openclaw/openclaw@202ccf4 test: cover dynamic live model refs fix: reject malformed media content length fix: parse ffprobe sample rates strictly chore: update dependency pins · openclaw/openclaw@c2c2958 fix: parse ps cpu time formats fix: clamp read tool line limits · openclaw/openclaw@5393240 fix: parse sandbox stat fields strictly · openclaw/openclaw@5ebf3b0 fix(scripts): give boundary root shims macos headroom · openclaw/openclaw@ea0b6bc fix(e2e): bound kitchen sink rpc probe bodies · openclaw/openclaw@5fc5aa8 fix: honor bare ipv6 no_proxy entries fix: honor ipv6 no_proxy entries · openclaw/openclaw@e205888 perf: reduce latency across async I/O hot paths · openclaw/openclaw@53475c2 fix: count qmd output caps by code point · openclaw/openclaw@9e1faf8 fix: cap chrome mcp stderr by utf8 bytes · openclaw/openclaw@f4f059e [codex] Use clawpdf for PDF extraction (#87670) fix: keep stderr tail within utf8 byte cap · openclaw/openclaw@478e0ec fix(images): skip CLI image cache refs (#87523) · openclaw/openclaw@51e2401 fix(ui): preserve session picker on empty search blur (#87682) · openclaw/openclaw@e9655b9 fix: parse lsp content length by byte fix(agents): surface MCP structured content in tool results · openclaw/openclaw@2df8021 fix(voice-call): make webhook replays token-safe · openclaw/openclaw@cd0b692 fix(scripts): bound Z.AI fallback repro output · openclaw/openclaw@716fd67 perf: cache bundled channel entry resolution · openclaw/openclaw@a85ff92 fix(webchat): preserve sends through reconnect (#87531) fix: reject malformed inspected tcp ports · openclaw/openclaw@c00ac95 fix: reject malformed marketplace content length fix: reject exponent provider integer options · openclaw/openclaw@03e6181 fix(sessions): recover empty preflight compaction · openclaw/openclaw@5f88932 perf: reduce gateway startup sidecar overhead fix: canonicalize secret target array indexes · openclaw/openclaw@e67ff0c fix: harden config array index parsing feat(gateway): show warm MCP tools in effective inventory fix(approvals): restore reaction command prompt lines fix(scripts): bound control UI i18n process output · openclaw/openclaw@e707b45 docs: remove public GHSA fix mechanism details · openclaw/openclaw@79e733c fix(agents): concatenate signature_delta chunks in transport stream · openclaw/openclaw@8dc9cfe fix(agents): handle seeded Anthropic signatures · openclaw/openclaw@f8c8c0d fix(auto-reply): respect provider for directive persistence (#87683) fix(agents): preserve reasoning_content replay across DeepSeek tier s… docs: treat CLI setup flows as API contracts (#87685) docs: harden GHSA wording guidance · openclaw/openclaw@b601550 fix(openrouter): apply strict9 ids to Mistral routes · openclaw/openclaw@ad1d8bf perf: cache plugin module exports per loader perf: prefer built bundled runtime surfaces · openclaw/openclaw@81c90aa Block provider credentials from workspace dotenv [AI] (#83655) · openclaw/openclaw@85277c2 fix(core): restore changed gate typecheck · openclaw/openclaw@9adbab0 fix(agents): quarantine compaction tool schemas · openclaw/openclaw@83bb5fb fix: reject partial numeric parsing · openclaw/openclaw@b6ef874 perf: reduce gateway runtime discovery overhead · openclaw/openclaw@68e6f03 fix(codex): bound sandbox http stream lines · openclaw/openclaw@7b5f0c2 fix(ssh): bound config probe output · openclaw/openclaw@3e2994b fix(msteams): bind bot framework service urls (#87160) · openclaw/openclaw@2c3d7f5 fix(telegram): bound proof command output fix(daemon): preserve explicit systemd unit during refresh fix(gateway): preserve traced child sessions · openclaw/openclaw@3f3ed5e feat(ios): refresh pro UI and gateway flows (#87367) fix(imessage): bound cli output capture · openclaw/openclaw@65d47dc fix(auto-reply): bound scp staging stderr · openclaw/openclaw@b474130 fix(voice-call): ignore tailscale helper stderr · openclaw/openclaw@76f447b fix(voice-call): ignore ngrok probe output · openclaw/openclaw@bc6ecc8 fix(voice-call): drain tailscale tunnel output fix(scripts): bound boundary check output fix(voice-call): bound tailscale status output docs: point release process at public evidence repo · openclaw/openclaw@910354b fix(telegram): retain streamed long final prefixes · openclaw/openclaw@27d57af test(telegram): cover long streamed final replay fix(release): bound command output capture · openclaw/openclaw@b667bdd fix(docker): alias main images to latest release · openclaw/openclaw@3cb7ae5 perf: reduce agent turn CPU overhead · openclaw/openclaw@b58786c fix(matrix): bound bootstrap output capture fix(agents): bound search tool stderr · openclaw/openclaw@f2f18f5 fix(process): bound command output capture fix(ci): run CodeQL on main pushes · openclaw/openclaw@44451ea fix(backup): cap verify manifest extraction fix(agents): normalize session tool limits · openclaw/openclaw@38f3040 test(telegram): cover draft preview overflow · openclaw/openclaw@a048cbc
fix: parse discord retry delays strictly · openclaw/openclaw@1d28dd8
steipete · 2026-05-29 · via Recent Commits to openclaw:main

File tree

  • extensions/discord/src/internal

Original file line numberDiff line numberDiff line change

@@ -12,6 +12,9 @@ export function readDiscordCode(body: unknown): number | undefined {

1212

return undefined;

1313

}

1414
15+

const RETRY_AFTER_HEADER_DELAY_RE = /^\d+$/;

16+

const RETRY_AFTER_BODY_SECONDS_RE = /^(?:\d+\.?\d*|\.\d+)$/;

17+
1518

export function readDiscordMessage(body: unknown, fallback: string): string {

1619

const value =

1720

body && typeof body === "object" && "message" in body

@@ -24,19 +27,21 @@ function readRetryAfterHeader(value: string | null, now = Date.now()): number |

2427

if (!value) {

2528

return undefined;

2629

}

27-

const seconds = Number(value);

28-

if (Number.isFinite(seconds)) {

29-

return seconds;

30+

const trimmed = value.trim();

31+

if (RETRY_AFTER_HEADER_DELAY_RE.test(trimmed)) {

32+

return Number(trimmed);

3033

}

31-

const retryAt = Date.parse(value);

34+

const retryAt = Date.parse(trimmed);

3235

return Number.isFinite(retryAt) ? (retryAt - now) / 1000 : undefined;

3336

}

3437
3538

function coerceRetryAfterSeconds(value: unknown): number | undefined {

36-

if (typeof value !== "number" && typeof value !== "string") {

37-

return undefined;

38-

}

39-

const seconds = typeof value === "number" ? value : Number(value);

39+

const seconds =

40+

typeof value === "number"

41+

? value

42+

: typeof value === "string" && RETRY_AFTER_BODY_SECONDS_RE.test(value.trim())

43+

? Number(value.trim())

44+

: undefined;

4045

return Number.isFinite(seconds) && seconds >= 0 ? Math.max(0, seconds) : undefined;

4146

}

4247
Original file line numberDiff line numberDiff line change

@@ -532,6 +532,19 @@ describe("RequestClient", () => {

532532

await expectRateLimitError(client.get("/channels/c1/messages"), { retryAfter: 7 });

533533

});

534534
535+

it("rejects non-decimal Retry-After numeric strings", async () => {

536+

const client = new RequestClient("test-token", {

537+

queueRequests: false,

538+

fetch: async () =>

539+

new Response(JSON.stringify({ message: "Slow down", retry_after: "1e3", global: false }), {

540+

status: 429,

541+

headers: { "Retry-After": "0x10" },

542+

}),

543+

});

544+
545+

await expectRateLimitError(client.get("/channels/c1/messages"), { retryAfter: 1 });

546+

});

547+
535548

it("tracks invalid requests and exposes bucket scheduler metrics", async () => {

536549

const client = new RequestClient("test-token", {

537550

queueRequests: false,