Fix win32 printing, fix my stupid json vulnerability
All checks were successful
Build and Deploy on Tag / 🔨 Build for Arch Linux/Static Builds (push) Successful in 1m48s
Build and Deploy on Tag / 🔨 Build win32 and update the tap 🍺 (push) Successful in 1m35s

This commit is contained in:
2026-06-01 06:37:14 -05:00
parent 25d67053cc
commit 41d503cfb5
11 changed files with 306 additions and 158 deletions

View File

@@ -15,9 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "TessesFramework/Serialization/Json.hpp"
#include "TessesFramework/Http/HttpUtils.hpp"
#include "TessesFramework/TessesFramework.hpp"
#include <functional>
#include "TessesFramework/Common.hpp"
@@ -129,6 +129,7 @@ JToken Json::Decode(std::string str) {
v |= HttpUtils::HexToNibble(str[i])
<< ((3 - i2) * 4);
}
i--;
uint32_t v2 = v;
@@ -274,7 +275,8 @@ JToken Json::Decode(std::string str) {
break;
} else {
throw std::runtime_error("Invalid JSON object.");
throw std::runtime_error("Invalid JSON object. " +
std::to_string(tokenIndex));
}
}
return obj;