Handle Javascript URLs correctly from loadQuery command
LoadQuery is called for commands such as (paste&Go, QRScan and voice search). the query passed to it is not sanitized and can have javascript which shouldn't be executed. This CL sanitize the input of the LoadQuery command to make sure it's safe. The sanitization works by compressing white spaces from the beginning of the query & then strip javascript: scheme if it exists on the beginning of the query. examples of sanitization results: "javascript:abc"->"abc", "javascript:" -> " java" -> " java" Bug: 877984 Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs Change-Id: I8524632092d3ecb0c4c23f26e3baa25ac305e58b Reviewed-on: https://chromium-review.googlesource.com/1205601Reviewed-by:Mark Cogan <marq@chromium.org> Reviewed-by:
Eugene But <eugenebut@chromium.org> Commit-Queue: Mohammad Refaat <mrefaat@chromium.org> Cr-Commit-Position: refs/heads/master@{#589561}
Showing
Please register or sign in to comment