Skip to content

Escaping a string to pass to flash() causes a PHP warning #231

@AurelioDeRosa

Description

@AurelioDeRosa

I'm using Klein 2.0.2 and in a function I have:

$service->flash('my message' . $service->escape($request->data), 'info');

While trying the robustness of the code, I set $request->data to <script> which is converted into %3Cscript%3E and this is the message I receive:

Warning: vsprintf(): Too few arguments in XXX\vendor\klein\klein\Klein\ServiceProvider.php on line 239

I've noted that even without calling $service->escape() the issue is still there because the parameter has already been escaped.

Hope this helps.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions