Double quotes (") are not properly escaped in the auto-generated .reg template |
||||
Issue descriptionSTR: 1. Downloaded the latest version of the templates from: wget https://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip 2. unzip policy_templates.zip windows/examples/chrome.reg 3. view windows/examples/chrome.reg Then look at the lines containing: - ExtensionSettings - ManagedBookmarks - RegisteredProtocolHandlers ... and observe that the quotes in the string are not quoted. For example: "RegisteredProtocolHandlers"="[{"default": true, "protocol": "mailto", "url": "https://mail.google.com/mail/?extsrc=mailto&url=%s"}]" Some other keys, such as "DefaultPrinterSelection" are quoted as expected: "DefaultPrinterSelection"="{ \"kind\": \"cloud\", \"idPattern\": \".*public\", \"namePattern\": \".*Color\" }"
,
Apr 27 2018
,
Jun 19 2018
,
Jun 19 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4d547b4bcce9bc2d9e6b13fbd09e398839d308f6 commit 4d547b4bcce9bc2d9e6b13fbd09e398839d308f6 Author: A Olsen <olsen@chromium.org> Date: Tue Jun 19 13:06:40 2018 Escape quotes (") in auto-generated .reg template When generating the .reg template, policies that are strings are properly escaped. And for policies that are dicts - the strings inside those dicts are properly escaped eg: {"quote_of_the_day": "\"I'll be back\" - Arnold"} But then the dict as a whole is wrapped in quotes but not escaped. Eg: "{"quote_of_the_day": "\"I'll be back\" - Arnold"}" Note that this string ends immediately due to improper escaping: "{" This affects three policies (that are included in the REG file): ManagedBookmarks, ExtensionSettings and RegisteredProtocolHandlers. The diff in the generated REG file is available internally here: go/chromeregdiff Bug: 834893 Change-Id: Ied752f1f4fea4fdf3a31706080f0e3e9484060e8 Reviewed-on: https://chromium-review.googlesource.com/1104465 Reviewed-by: Lutz Justen <ljusten@chromium.org> Commit-Queue: A Olsen <olsen@chromium.org> Cr-Commit-Position: refs/heads/master@{#568422} [modify] https://crrev.com/4d547b4bcce9bc2d9e6b13fbd09e398839d308f6/components/policy/tools/template_writers/writers/reg_writer.py [modify] https://crrev.com/4d547b4bcce9bc2d9e6b13fbd09e398839d308f6/components/policy/tools/template_writers/writers/reg_writer_unittest.py
,
Jun 19 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by atwilson@chromium.org
, Apr 20 2018Owner: ljusten@chromium.org