rawlinp opened a new pull request #4718:
URL: https://github.com/apache/trafficcontrol/pull/4718
## What does this PR (Pull Request) do?
Fix the validation of invalidation job TTLs per the `maxRevalDurationsDays`
parameter. The broken validation was not converting days to hours before doing
the validation. This PR also adds that validation to the `/jobs` endpoints
because it was missing.
- [x] This PR is not related to any Issue
## Which Traffic Control components are affected by this PR?
- Traffic Ops
## What is the best way to verify this PR?
Run the unit tests and TO API tests. Verify they pass. Manually `POST
/api/1.4/user/current/jobs` with a ttl that higher than the value of the
`maxRevalDurationDays` parameter (x 24). Example request json below:
```
{
"startTime": "2020-05-26 16:48:32",
"dsId": 442,
"regex": "/foobar",
"ttl": 3000
}
```
## If this is a bug fix, what versions of Traffic Control are affected?
- master
- 4.0.0
- 4.1.0-RC0
## The following criteria are ALL met by this PR
- [x] This PR includes tests
- [x] bugfix, no docs necessary
- [x] This PR includes an update to CHANGELOG.md
- [x] This PR includes any and all required license headers
- [x] This PR ensures that database migration sequence is correct OR this PR
does not include a database migration
- [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the
Apache Software Foundation's security
guidelines](https://www.apache.org/security/) for details)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]