[PR #1697] Read full stdin when publishing #1697

Open
opened 2026-05-07 01:03:17 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/1697
Author: @ShipItAndPray
Created: 4/12/2026
Status: 🔄 Open

Base: mainHead: fix/publish-stdin-unbounded


📝 Commits (1)

  • 95ce413 Stream redirected stdin when publishing

📊 Changes

2 files changed (+43 additions, -12 deletions)

View changed files

📝 cmd/publish.go (+9 -12)
📝 cmd/publish_test.go (+34 -0)

📄 Description

Fixes #1677.\n\n previously truncated redirected stdin at 1 MiB before sending the request. That closed the pipe early and could kill upstream producers with a broken pipe once the payload exceeded the hardcoded cap.\n\nThis removes the premature cap so redirected stdin is consumed in full, and adds a regression test that verifies the entire payload reaches the server.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/1697 **Author:** [@ShipItAndPray](https://github.com/ShipItAndPray) **Created:** 4/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/publish-stdin-unbounded` --- ### 📝 Commits (1) - [`95ce413`](https://github.com/binwiederhier/ntfy/commit/95ce413ccb0afbf0a1ae8a8a09f7b27d7a73ab14) Stream redirected stdin when publishing ### 📊 Changes **2 files changed** (+43 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `cmd/publish.go` (+9 -12) 📝 `cmd/publish_test.go` (+34 -0) </details> ### 📄 Description Fixes #1677.\n\n previously truncated redirected stdin at 1 MiB before sending the request. That closed the pipe early and could kill upstream producers with a broken pipe once the payload exceeded the hardcoded cap.\n\nThis removes the premature cap so redirected stdin is consumed in full, and adds a regression test that verifies the entire payload reaches the server. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1697
No description provided.