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

Null byte in regex #13772

Closed
nijel opened this Issue Oct 23, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@nijel
Member

nijel commented Oct 23, 2017

This seems to happen only in master on tbl_structure.php:

Warning in ./tmp/twig/0d/0da6a0b8ecebb7575f70f472e5b82aea3f679c74e92c76aa5274ed8f6f9e33f8.php#181
preg_replace(): Null byte in regex

Backtrace

./tmp/twig/0d/0da6a0b8ecebb7575f70f472e5b82aea3f679c74e92c76aa5274ed8f6f9e33f8.php#181: preg_replace(
string '/[' . "\0" . '-�]/',
string '⁑',
string 'id',
)
./vendor/twig/twig/lib/Twig/Template.php#432: __TwigTemplate_d993bc8d824069c1b52296da0c3830ffbbf4cbe38d61ff33dd7ed8940da0cc99->doDisplay(
array,
array,
)
./vendor/twig/twig/lib/Twig/Template.php#403: Twig_Template->displayWithErrorHandling(
array,
array,
)
./vendor/twig/twig/lib/Twig/Template.php#411: Twig_Template->display(array)
./vendor/twig/twig/lib/Twig/TemplateWrapper.php#43: Twig_Template->render(array)
./libraries/classes/Template.php#132: Twig_TemplateWrapper->render(array)
./libraries/classes/Controllers/Table/TableStructureController.php#1292: PhpMyAdmin\Template->render(array)
./libraries/classes/Controllers/Table/TableStructureController.php#351: PhpMyAdmin\Controllers\Table\TableStructureController->displayStructure(
array,
array,
array,
boolean false,
array,
array,
)
./tbl_structure.php#57: PhpMyAdmin\Controllers\Table\TableStructureController->indexAction()

It seems to be coming from here:

'displayed_field_name': preg_replace(
'/[\x00-\x1F]/',
'⁑',
displayed_field_name
),

@nijel nijel added this to the 4.8.0 milestone Oct 23, 2017

nijel referenced this issue Oct 23, 2017

Port table/structure/display_structure to Twig
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>

@mauriciofauth mauriciofauth self-assigned this Oct 23, 2017

@mauriciofauth mauriciofauth added the bug label Oct 24, 2017

@mauriciofauth

This comment has been minimized.

Show comment
Hide comment
@mauriciofauth
Member

mauriciofauth commented Oct 24, 2017

Thanks, @nijel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment