MyBB Community Forums

Full Version: template vars UTF8
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to add a var to my template, but get this message: "A potential security issue was found in the template. Please review your changes or contact the MyBB Group for support."

it's caused by "{$filters_set[ambientacion][selected][Bélico]}"
because of the accent. {$filters_set[ambientacion][selected][Belico]} doesn't trigger the error.

Why is this a security issue? The end-user can't do anything right?
How can I deactivate this warning?
You can't deactivate it.

It has to do with the special character in the first variable, "é", and probably the encoding of the database.

Can you use the second instead of the first?
PHP doesn't accept special characters in variables, only alphanumeric (a-z 1-9) characters, and underscores are allowed... + a variable can't start with a numeric character, those are the basics... Wink
It's not a variable though, it's an array key.

It's probably just a bug, you can report it here: http://dev.mybb.com/projects/mybb/
I'm assuming the preg function just requires the /u modifier for multi-byte characters. Report it and we'll take a look. Using characters like these in array keys seems strange to me though.
The array keys are created dynamically by the XThreads plugin. The key equals the display, so it's imposible not to use é.

I've reported the issue here

Untill it's fixed, I I'll use a manual edit of the database field.