Bug #39683
closed
wrong character class in valueCheck for "alphanum_x"
Added by Stefan Froemken over 12 years ago.
Updated about 11 years ago.
Category:
DataHandler aka TCEmain
Description
Have a look here:
http://www.php.net/manual/de/regexp.reference.character-classes.php
Within character classes \, -, ^ are special characters, so you have to excape them.
But in method: checkValue_input_Eval you have following:
case 'alphanum_x':
$value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value);
break;
it should be:
case 'alphanum_x':
$value = preg_replace('/[^a-zA-Z0-9_\-]/', '', $value);
break;
Stefan
Files
Patch files attached for versions 4.5, 4.6, 4.7 and 6.0beta1
- Status changed from New to Under Review
- Status changed from Under Review to Needs Feedback
What's the state of this issue?
- Status changed from Needs Feedback to Under Review
Hello Alexander,
the problem is, that I have added a too simple solution to the core and the meaning of the core is: We want to keep your credits on this issue. So if someone of the core solves this issue my credits get lost. It was a kind of honor to try it again. But I'm not Mr perfect in writing UnitTest so it needs over an hour to add this additional "feature".
Stefan
Hi Stefan,
but you tried and it seems a good solution. So you invested your time into learning something. And with the review you get a response how good you've learned. :-)
I don't understand this issue anymore. All samples work with and without backslash. Maybe it was a problem by PHP-Version. Don't know. But for now you can close this ticket.
Stefan
- Status changed from Under Review to Closed
- Is Regression set to No
Also available in: Atom
PDF