]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: thinkpad_acpi: Replace HTTP links with HTTPS ones
authorAlexander A. Klimov <grandmaster@al2klimov.de>
Mon, 13 Jul 2020 19:06:28 +0000 (21:06 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 15 Jul 2020 09:45:06 +0000 (12:45 +0300)
commitefc29842e6139be07776e9634ab1325ce81d5f05
tree878af01691c5e1f2aaa1dc798a738ef90d014f3a
parent34bcbb5ca126b4b7ee461ddb6d3ac3439c02a579
platform/x86: thinkpad_acpi: Replace HTTP links with HTTPS ones

Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/thinkpad_acpi.c