[PR #62] [MERGED] Add maximum expiry #137

Closed
opened 2026-02-27 10:15:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/matze/wastebin/pull/62
Author: @HeapUnderfl0w
Created: 7/6/2024
Status: Merged
Merged: 7/10/2024
Merged by: @matze

Base: masterHead: max-paste-expiry


📝 Commits (2)

📊 Changes

8 files changed (+103 additions, -9 deletions)

View changed files

📝 README.md (+1 -0)
📝 src/env.rs (+22 -0)
📝 src/main.rs (+4 -0)
📝 src/pages.rs (+60 -0)
📝 src/routes/form.rs (+6 -0)
📝 src/routes/json.rs (+7 -1)
📝 src/test_helpers.rs (+1 -0)
📝 templates/index.html (+2 -8)

📄 Description

This aims to implement #54, and also be an improvement over #55.

Changes Made:

  • Add WASTEBIN_MAX_PASTE_EXPIRY WASTEBIN_MAX_PASTE_EXPIRATION
  • Ensure both the form and json routes honor the set limit (if any) (currently not done by #55)
    • Currently it simply clamps the expiry time
    • Invalid values or too large values will cause an error
  • Remove invalid options from the new-paste UI
    • Correctly hide never expire if any limit is set
    • Always show burn, even if the limit is 0
    • Default select the "top" most expiry (either "never", or 10 minutes)

🔄 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/matze/wastebin/pull/62 **Author:** [@HeapUnderfl0w](https://github.com/HeapUnderfl0w) **Created:** 7/6/2024 **Status:** ✅ Merged **Merged:** 7/10/2024 **Merged by:** [@matze](https://github.com/matze) **Base:** `master` ← **Head:** `max-paste-expiry` --- ### 📝 Commits (2) - [`88ce98c`](https://github.com/matze/wastebin/commit/88ce98c261d5e7b0246785ea04eecf9676f03e94) Add maximum expiry - [`72e1d83`](https://github.com/matze/wastebin/commit/72e1d834d7a7d36b7605713dc1dab9f9f9963641) apply review ### 📊 Changes **8 files changed** (+103 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) 📝 `src/env.rs` (+22 -0) 📝 `src/main.rs` (+4 -0) 📝 `src/pages.rs` (+60 -0) 📝 `src/routes/form.rs` (+6 -0) 📝 `src/routes/json.rs` (+7 -1) 📝 `src/test_helpers.rs` (+1 -0) 📝 `templates/index.html` (+2 -8) </details> ### 📄 Description This aims to implement #54, and also be an improvement over #55. Changes Made: - Add ~`WASTEBIN_MAX_PASTE_EXPIRY`~ `WASTEBIN_MAX_PASTE_EXPIRATION` - Ensure both the form and json routes honor the set limit (if any) (currently not done by #55) - ~Currently it simply clamps the expiry time~ - Invalid values or too large values will cause an error - Remove invalid options from the new-paste UI - Correctly hide `never expire` if any limit is set - Always show `burn`, even if the limit is 0 - Default select the "top" most expiry (either "never", or 10 minutes) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:15:54 +03:00
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/wastebin-matze#137
No description provided.