TextValidator is insecure
|Priority:||Should have||Due date:|
|Target version:||-||Estimated time:||6.00 hours|
|Has patch:||No||FLOW3 version affected:||FLOW3 1.0.0|
The TextValidator currently allows strings like
%3cspan style="color: #BBBBBB;"%3ea nice text%3c/span%3e
It seems like we can't solve this completely with filter_var because then characters like percent, semikolon, quotes etc. can't be used in a text. In general the test case lacks realistic string which should pass the validator.
[~BUGFIX] FLOW3 (Validation): The ValidatorResolver test case failed - but only if the Blog package was installed. This was due to some Blog model being used by a data provider which in reality should have been a sample, not existing class. Fixed that.
[~TASK] FLOW3 (Validation): The TextValidator was too restrictive because it did not allow line breaks and other common characters - now it does. However, it's not really secure yet. Relates to #3977
[+BUGFIX] Fluid (Core): Added some safe guard and aception to the Abstract Node which would exit with a fatal error in some cases.
Updated by Karsten Dambekalns over 3 years ago
- File TextValidatorTest.php.patch added
- Priority changed from Could have to Should have
Attached a patch for the unit test that makes adding new valid and invalid input easier.
Updated by Robert Lemke over 3 years ago
- Status changed from New to Accepted
- Assignee set to Robert Lemke
- % Done changed from 0 to 20
- Estimated time set to 6.00
Updated by Karsten Dambekalns about 3 years ago
- Target version changed from 1.0 alpha 8 to 1.0 alpha 9
Updated by Bastian Waidelich over 1 year ago
- Has patch set to No
IMO TextValidator should be removed as it depends on the context whether a string is insecure or not (also see comment at #6121)
Updated by Christian Mueller over 1 year ago
- Status changed from Accepted to Rejected
- Assignee deleted (
The test improvements are in review now, I will close this, we could decide to deprecate the TextValidator at some point. I added also some longer comment to the TextValidator to point out that it won't make sure the validated string is secure in all possible output environments.