• Kelvin Jiang's avatar
    [DNR] Check for all hosts for API permission privilege increase · 577446b5
    Kelvin Jiang authored
    If an extension uses all hosts (e.g. by specifying <all_urls> in host
    permissions), an API permission kHostsAll is created somewhere down the
    line. This permission is used to provide a permission message, but
    kHostsAll is not added as an API permission when checking if there is
    a privilege increase between a set of granted vs requested API
    permissions. As a result, an extension can be reported for a privilege
    increase even when it shouldn't.
    
    This CL fixes this issue by adding kHostsAll for privilege increase
    checks to make sure the right messages are compared.
    
    Bug: 1014505, 512344
    Change-Id: Ie20045c6760b50dae5949b9cceaf10467fcf1534
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2042387Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
    Commit-Queue: Kelvin Jiang <kelvinjiang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#741542}
    577446b5
chrome_permission_message_provider.cc 11.1 KB