luci-base: http.uc: fix eof detection in temporary upload files
authorJo-Philipp Wich <jo@mein.io>
Mon, 21 Aug 2023 14:37:11 +0000 (16:37 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 21 Aug 2023 14:37:11 +0000 (16:37 +0200)
commitb4594b3d111171510d2581e9f0ce30bee78bd214
tree697574dda3c4a7cfa3e66cace7d8c37c8050b4aa
parent18b637fed9f58b7a3f146a004ecd5b0aef2cb058
luci-base: http.uc: fix eof detection in temporary upload files

Binary string comparisons in ucode are currently unsafe, so use the
`length()` function to determine the just read data chunk size in
order to test for end of file.

Fixes: #6530
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/ucode/http.uc