usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.48k stars 577 forks source link

make sure TTL is 0-86400 inclusive when add or update #1140

Closed xmok closed 8 months ago

xmok commented 8 months ago

This PR ensures that user can't pass a negative or out-of-bounds TTL value. ~User can still enter a negative value through CyberPanel but this makes sure that the value is not saved.~

EDIT: added a commit so input field has min=0 and max=86400.

NOTE TO REVIEWERS: There is room for improvement in cloudAPI - are there any major plans to overhaul cloudAPI? I would be willing to provide a PR with a proof of concept on how we can improve it somewhat without breaking the existing endpoints.