Commit dead1f3d authored by Arnolds's avatar Arnolds
Browse files

When could strlen of bool be more than 20000 :D? It could have caused a...

When could strlen of bool be more than 20000 :D? It could have caused a disaster! Fixed with right property for length checking.
parent b9cd4062
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ if ($method === 'POST') {
        exit;
    }

    if (strlen($data['encrypted']) > 20000) {
    if (strlen($data['secret']) > 20000) {
        http_response_code(413); // Content Too Large
        echo json_encode(['error' => '<p class="mb-0">Ai! Lēnāk ar zirgiem 🐎! Tavs noslēpums ir kā romāns trīs sējumos. Mēģini iekļauties 10000 simbolos, Hemingvej 📚✂️!</p>']);
        exit;