Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 11072062: Make sure translations can only use two HTML tags without any attributes - no custom HTML code in t… (Closed)

Created:
July 10, 2013, 6:50 a.m. by Wladimir Palant
Modified:
July 10, 2013, 9:41 a.m.
Reviewers:
Thomas Greiner
Visibility:
Public.

Description

The fact that we currently allow custom HTML code in Chrome translations is a bug, not a feature. The implications of a malicious translation in Chrome are limited, in Firefox it would be an outright security vulnerability however.

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -10 lines) Patch
M chrome/content/ui/i18n.js View 2 chunks +30 lines, -10 lines 3 comments Download

Messages

Total messages: 4
Wladimir Palant
July 10, 2013, 6:50 a.m. (2013-07-10 06:50:36 UTC) #1
Thomas Greiner
LGTM one comment but not a necessary change http://codereview.adblockplus.org/11072062/diff/1/chrome/content/ui/i18n.js File chrome/content/ui/i18n.js (right): http://codereview.adblockplus.org/11072062/diff/1/chrome/content/ui/i18n.js#newcode121 chrome/content/ui/i18n.js:121: node.removeChild(node.lastChild); ...
July 10, 2013, 8:45 a.m. (2013-07-10 08:45:38 UTC) #2
Wladimir Palant
http://codereview.adblockplus.org/11072062/diff/1/chrome/content/ui/i18n.js File chrome/content/ui/i18n.js (right): http://codereview.adblockplus.org/11072062/diff/1/chrome/content/ui/i18n.js#newcode121 chrome/content/ui/i18n.js:121: node.removeChild(node.lastChild); I would rather avoid using innerHTML for anything ...
July 10, 2013, 9:07 a.m. (2013-07-10 09:07:23 UTC) #3
Thomas Greiner
July 10, 2013, 9:41 a.m. (2013-07-10 09:41:43 UTC) #4
http://codereview.adblockplus.org/11072062/diff/1/chrome/content/ui/i18n.js
File chrome/content/ui/i18n.js (right):

http://codereview.adblockplus.org/11072062/diff/1/chrome/content/ui/i18n.js#n...
chrome/content/ui/i18n.js:121: node.removeChild(node.lastChild);
I wasn't aware of that review process. I assume that's not the case for
textContent because it has the same effect if you do
node.textContent = "";

Powered by Google App Engine
This is Rietveld