OSDN Git Service

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)
commit19206a1edc518e6f39ae2307598afe20ae74ae6b
tree878af01691c5e1f2aaa1dc798a738ef90d014f3a
parent46713aeee154205fc0285b0d9ac78cb4bdf246a7
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