Review main Abandoned

37195[FEATURE] Add allowed tags to stripHtml

Frank Nägler CR 0 V 0 Easy +28 −1 updated 02/26/15, 10:58

Commit message

The stdWrap feature stripHtml has now an option to define allowed tags.
The new option make use of the second argument of the PHP method strip_tags

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 5

  1. Frank Nägler uploaded patch set 1 02/24/15, 23:04

  2. Alexander Opitz commented on patch set 1 CR -1 02/25/15, 08:28

    As reading the documentation to strip_tags ... this possibility will bring you a hell of security issues. 1.) You can't define the parameters in the tags. 2.) False handling of tag in input results in unpredictable output. So I'm against this feature.
  3. Helmut Hummel commented on patch set 1 CR -2 02/26/15, 10:54

    I must say, I strongly agree with Alex here. strip tags functionality is only useful in combination with user provided HTML strings (as static strings should not contain the tags in the first place). Due to how this PHP function works, it is still necessary to HTML encode the result so that it is safe to use in a HTML context. Adding allowable tags, would assume that a final HTML encoding is not necessary, as the result would contain tags which must not be encoded. conclusion: adding this would add more potential security pitfalls and we already have plenty of them. Besides that, we have the userFunc property of stdWrap to cover any functionality for string manipulation that might be required in a project, so there is not even a need to cover some potential use cases.
  4. Frank Nägler commented on patch set 1 02/26/15, 10:58

    thx for your comments, I will abandon this change and close the issue
  5. Frank Nägler abandoned the change 02/26/15, 10:58

    for security reasons, we will not implement this feature, see comments from Alex and Helmut.