You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "destinyoooo (via GitHub)" <gi...@apache.org> on 2026/07/12 03:36:01 UTC
[I] [Bug] [api] Resource preview API should validate the limit parameter [dolphinscheduler]
destinyoooo opened a new issue, #18412:
URL: https://github.com/apache/dolphinscheduler/issues/18412
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
The resource preview API validates `skipLineNum`, but does not validate the `limit` parameter.
`limit` is used to control how many lines should be fetched. Based on the current API behavior, `-1` means no limit, and positive values mean the number of lines to fetch.
However, invalid values such as `0` or values less than `-1` are not rejected by the validator.
### What you expected to happen
The API should reject invalid `limit` values before fetching file content.
Valid values should be:
- `-1`: no limit
- positive integers: fetch up to that many lines
Invalid values should be rejected:
- `0`
- values less than `-1`
### How to reproduce
Use different parameters when calling the API.
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [api] Resource preview API should validate the limit parameter [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on issue #18412:
URL: https://github.com/apache/dolphinscheduler/issues/18412#issuecomment-4955017146
This is not a bug. I'll mark it as an improvement.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Improvement] [api] Resource preview API should validate the limit parameter [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS closed issue #18412: [Improvement] [api] Resource preview API should validate the limit parameter
URL: https://github.com/apache/dolphinscheduler/issues/18412
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org