feat: improve container log viewer and download options by ssongliu · Pull Request #12025 · 1Panel-dev/1Panel
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validate tail as integer before downloading logs
The new free-form tail input (allow-create) accepts values like 1.5, but the guard here only rejects NaN and negatives, so decimals pass and are sent to DownloadFile(params). On the server side, Tail is bound as uint (agent/app/dto/container.go), so non-integer numeric input causes request binding/validation failure and the download action breaks for users who enter fractional values. Add an integer-only check before submitting.
Useful? React with 👍 / 👎.