FE sending invalid value for poll expiration, string instead of integer
Environment info
- Browser, version, OS, platform: Firefox 111.0 (64-bit) on Windows 10 Home 22H2 Windows Feature Experience Pack 120.2212.4190.0
- Instance URL: p.jonossaseuraava.net
- Frontend version (see settings -> about): eec27700
- Backend version (see settings -> about): 2.5.51-78-gbf9db784-develop
- Browser extensions (ublock, rikaichamp etc): shit tons - none affect the post data. afaik
- Known instance/user customizations (i.e. pleromafe mods/forks, instance styles etc)
Bug description & reproduction steps
"Error: expires_in - Invalid integer. Got: string." when poll end date 69 days or hours.
Thiss will result in FE trying to POST stuff like
Content-Disposition: form-data; name="poll[expires_in]"
5961600.000000001
or
Content-Disposition: form-data; name="poll[expires_in]"
248400.00000000003
back end responds with
{
"error": "expires_in - Invalid integer. Got: string.",
"errors": [
{
"message": "Invalid integer. Got: string",
"source": {
"pointer": "/poll/expires_in"
},
"title": "Invalid value"
}
]
}
Reproduction
Create poll and set expiration to 69 hours or days. It is likely that other values result in the same bug.
Bug seriousness
- How annoying it is: the most minor shit
- How often does it happen: every time you wanna 69
- How many people does it affect: no idea
- Is there a workaround for it: yes, choose diffrent exiration value
orginally discovered by xarvos on akkoma