[PR #64] [MERGED] fix(deploy): warn on privileged custom port and strip leading zeros #103

Closed
opened 2026-03-02 15:47:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/PegaProx/project-pegaprox/pull/64
Author: @ry-ops
Created: 2/21/2026
Status: Merged
Merged: 2/21/2026
Merged by: @mkellermann97

Base: mainHead: fix/deploy-privileged-port-warning


📝 Commits (1)

  • 73d6f97 fix(deploy): warn on privileged custom port and strip leading zeros

📊 Changes

1 file changed (+9 additions, -1 deletions)

View changed files

📝 deploy.sh (+9 -1)

📄 Description

Summary

Two issues with the custom port input (option 3) in the interactive port-selection step of deploy.sh:

  1. Leading zeros — bash integer comparisons interpret values like "007" as octal in some shells. Strip leading zeros with parameter expansion before the range check.

  2. No inline warning for privileged ports — entering a port below 1024 silently succeeded; the only hint was a brief note printed after the loop. Now, when a privileged port is chosen via the custom option, an explicit three-line warning is printed immediately so the user can reconsider before installation continues.

Test plan

  • Enter 007 as a custom port — should be treated as port 7, not octal 7
  • Enter 80 as a custom port — warning about privileged ports should appear before proceeding
  • Enter 8080 — no warning, install proceeds normally
  • Enter 99999 — "Invalid port" error appears

🤖 Generated with Claude Code


🔄 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/PegaProx/project-pegaprox/pull/64 **Author:** [@ry-ops](https://github.com/ry-ops) **Created:** 2/21/2026 **Status:** ✅ Merged **Merged:** 2/21/2026 **Merged by:** [@mkellermann97](https://github.com/mkellermann97) **Base:** `main` ← **Head:** `fix/deploy-privileged-port-warning` --- ### 📝 Commits (1) - [`73d6f97`](https://github.com/PegaProx/project-pegaprox/commit/73d6f97c9acdc7a808eb160ef13ab38473433650) fix(deploy): warn on privileged custom port and strip leading zeros ### 📊 Changes **1 file changed** (+9 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `deploy.sh` (+9 -1) </details> ### 📄 Description ## Summary Two issues with the custom port input (option 3) in the interactive port-selection step of `deploy.sh`: 1. **Leading zeros** — bash integer comparisons interpret values like `"007"` as octal in some shells. Strip leading zeros with parameter expansion before the range check. 2. **No inline warning for privileged ports** — entering a port below 1024 silently succeeded; the only hint was a brief note printed _after_ the loop. Now, when a privileged port is chosen via the custom option, an explicit three-line warning is printed immediately so the user can reconsider before installation continues. ## Test plan - [ ] Enter `007` as a custom port — should be treated as port 7, not octal 7 - [ ] Enter `80` as a custom port — warning about privileged ports should appear before proceeding - [ ] Enter `8080` — no warning, install proceeds normally - [ ] Enter `99999` — "Invalid port" error appears 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 15:47:56 +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/project-pegaprox-PegaProx#103
No description provided.