45326[TASK] EXT:backend Use htmlspecialchars instead of 2nd Param in getLL/sL
Commit message
Review
-
Code review CR +2
- Benni Mack +2
- Markus Klein +1
-
Verified V +2
- Benni Mack +2
- Markus Klein +1
Issues 1
Files 5
- typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php6+7 −7
- typo3/sysext/backend/Classes/Backend/ToolbarItems/LiveSearchToolbarItem.php+1 −1
- typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php+13 −13
- typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php+9 −9
- typo3/sysext/backend/Classes/Backend/ToolbarItems/UserToolbarItem.php+1 −1
Review log 15
-
Michael Oehlhof uploaded patch set 1 12/17/15, 00:47
-
Markus Klein voted on patch set 1 CR +1 V +1 12/17/15, 11:29
-
Jigal van Hemert commented on patch set 1 12/17/15, 17:40
Use default htmlspecialchars() or create API? (See note)ClearCacheToolbarItem.php:62htmlspecialchars() has options to process the output according to the type of output (doctype). The PHP documentation isn't really clear, but http://stackoverflow.com/questions/13745353/what-do-the-ent-html5-ent-html401-modifiers-on-html-entity-decode-do explains a lot. If we want to use this some API methods seem appropriate. -
Markus Klein commented on patch set 1 12/17/15, 17:49
ClearCacheToolbarItem.php:62ReplyAccording to your link, we have to do nothing at all. The default is save. -
Jigal van Hemert commented on patch set 1 12/17/15, 18:18
ClearCacheToolbarItem.php:62ReplyI didn't say that it wasn't safe. The default uses ENT_HTML401 which has a very limited entity set ( https://github.com/php/php-src/blob/php-5.4.11/ext/standard/html_tables/ents_html401.txt ). If you're using HTML5 output the ENT_HTML5 would be better because it uses a huge unicode entity list ( https://github.com/php/php-src/blob/php-5.4.11/ext/standard/html_tables/ents_html5.txt ) -
Markus Klein commented on patch set 1 12/17/15, 18:28
ClearCacheToolbarItem.php:62ReplyIMO this is not about encoding stuff, but about escaping (to be on the safe side). Every browser can read utf-8 chars today, so no need to encode them in any way. If encoding is really necessary, it should be done on the final output. -
Michael Oehlhof commented on patch set 1 12/17/15, 22:07
ClearCacheToolbarItem.php:62Replyhtmlspecialchars is called inside sL with 2nd and 3rd parameter as the default, only 4th parameter was set to false, could this be a problem here? Definition: htmlspecialchars ($string, $flags = ENT_COMPAT, $encoding = 'UTF-8', $double_encode = true) Call in sL: htmlspecialchars($output, ENT_COMPAT, 'UTF-8', false) -
Markus Klein commented on patch set 1 12/17/15, 22:15
ClearCacheToolbarItem.php:62ReplyGood question. I traced this line back. Before the current version it was t3lib_div::deHSCentities(htmlspecialchars()) and that dates back to Kasper's Initial Commit. So how likely is it that this label contains HTML code? I'd say very unlikely, so the change should be fine. -
Frank Nägler voted on patch set 1 CR +1 12/18/15, 12:40
-
Michael Oehlhof commented on patch set 1 12/22/15, 00:14
Should this also be fixed for 7.6? -
Markus Klein commented on patch set 1 CR 0 V 0 12/22/15, 08:25
No, I don't think so and I just realized that this is not a bugfix but a normal task actually. -
Markus Klein commented on patch set 2 12/22/15, 08:26
Published edit on patch set 1 -
Markus Klein voted on patch set 2 CR +1 V +1 12/22/15, 08:26
-
Benni Mack voted on patch set 2 CR +2 V +2 01/07/16, 21:36
-
Gerrit merged patch set 2 01/07/16, 21:36