Skip to content

Commit

Permalink
Increse frontend buffer to new buffer size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
polespinasa committed Apr 30, 2024
1 parent 223940d commit cb6035b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

function processTx(mixed $form, $conn): array
{
if (!is_array($form) || empty($form['tx']) || strlen($form['tx']) > 1024 || !preg_match('/^([0-9a-fA-F]{2})+$/', $form['tx'])) {
if (!is_array($form) || empty($form['tx']) || strlen($form['tx']) > 100*1024 || !preg_match('/^([0-9a-fA-F]{2})+$/', $form['tx'])) {
return ['class' => 'alert-danger', 'message' => 'Invalid transaction received.'];
}

Expand Down

4 comments on commit cb6035b

@polespinasa
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1ma Regarding a7460a6.

Please check that this commit is correct and makes the frontend comply with new socket buffer sizes.

Also why was it 1024 and not 512?

@1ma
Copy link
Collaborator

@1ma 1ma commented on cb6035b May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@polespinasa
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks the tests, do you know why?

@1ma
Copy link
Collaborator

@1ma 1ma commented on cb6035b May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no tests, it's just the linter. Apparently it wants the digits like so: 100 * 1024

To run in yourself you just need PHP and Composer, then:

$ cd frontend
$ composer install
$ composer lint

Please sign in to comment.