Project

General

Profile

Actions

Bug #39683

closed

wrong character class in valueCheck for "alphanum_x"

Added by Stefan Froemken over 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2012-08-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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

39683-45.patch (913 Bytes) 39683-45.patch Jochen Weiland, 2012-09-01 13:36
39683-46.patch (927 Bytes) 39683-46.patch Jochen Weiland, 2012-09-01 13:36
39683-47.patch (927 Bytes) 39683-47.patch Jochen Weiland, 2012-09-01 13:36
39683-60b1.patch (921 Bytes) 39683-60b1.patch Jochen Weiland, 2012-09-01 13:36

Updated by Jochen Weiland about 12 years ago

Patch files attached for versions 4.5, 4.6, 4.7 and 6.0beta1

Actions #2

Updated by Gerrit Code Review about 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14286

Actions #3

Updated by Alexander Opitz about 11 years ago

  • Status changed from Under Review to Needs Feedback

What's the state of this issue?

Actions #4

Updated by Gerrit Code Review about 11 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/14286

Actions #5

Updated by Gerrit Code Review about 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/14286

Actions #6

Updated by Gerrit Code Review about 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/14286

Actions #7

Updated by Stefan Froemken about 11 years ago

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

Actions #8

Updated by Alexander Opitz about 11 years ago

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. :-)

Actions #9

Updated by Stefan Froemken about 11 years ago

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

Actions #10

Updated by Wouter Wolters about 11 years ago

  • Status changed from Under Review to Closed
  • Is Regression set to No
Actions

Also available in: Atom PDF