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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to