Skip to content

HLAPI In RSQL filter error multibyte strings #21807

@Mikhail-D

Description

@Mikhail-D

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

11.0.1

Bug description

I found that RSQL like 'name=like=ç' return empty array.
In function tokenize length of query finded by mb_strlen, but next code use direct $query[$pos].

$length = mb_strlen($query, 'UTF-8');

and next code :

$char = $query[$pos];

As fix I change $char to mb_substr with 1 step position.

Lexer.php

PS. Replace text with as whole file.

Relevant log output

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions