• huangs's avatar
    [Top Sites] Validating URLs for "redirects" · 1d8faa9c
    huangs authored
    Redirects field in TopSitesDatabase is encoded as a space-seprated list
    of URLs. But data URLS like "data:text/plain,this text  has space" adds
    extra space, so that when decoded, non-URLs like "text" and "has" would
    trigger DCHECK in URL() downstream, and crash debug Chrome.
    
    This CL validates redirects URLs when they are read. It is not foolproof
    (e.g., "data:text/plan,hidden http://extra.url"), but now we can ponder
    how to best fix the root cause, without keeping the crashing bug around.
    
    BUG=358034
    
    Review URL: https://codereview.chromium.org/562993002
    
    Cr-Commit-Position: refs/heads/master@{#296232}
    1d8faa9c
top_sites_database.cc 27.1 KB