Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Crypt: Wrong padding calculation #16642

Closed
niden opened this issue Sep 4, 2024 · 1 comment
Closed

[BUG]: Crypt: Wrong padding calculation #16642

niden opened this issue Sep 4, 2024 · 1 comment
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: high High

Comments

@niden
Copy link
Member

niden commented Sep 4, 2024

Describe the bug
The block size calculation is not correct because mb_strlen is used instead of strlen

Block ciphers operate with fixed size blocks of bytes not symbols while mb_strlen counts symbols (which can be single-byte or multi-byte). A multi-byte character is counted as 1

Credit @elcreator

@niden niden added bug A bug report status: high High 5.0 The issues we want to solve in the 5.0 release labels Sep 4, 2024
@niden niden self-assigned this Sep 4, 2024
@niden niden added this to Phalcon v5 Sep 4, 2024
@niden niden moved this to Implemented in Phalcon v5 Sep 4, 2024
@niden
Copy link
Member Author

niden commented Sep 4, 2024

Resolved in #16643

@niden niden closed this as completed Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: high High
Projects
Status: Implemented
Development

No branches or pull requests

1 participant