]> git.baikalelectronics.ru Git - kernel.git/commit
HID: udraw-ps3: Replace HTTP links with HTTPS ones
authorAlexander A. Klimov <grandmaster@al2klimov.de>
Sat, 18 Jul 2020 10:33:44 +0000 (12:33 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 20 Jul 2020 10:24:41 +0000 (12:24 +0200)
commit16addf8a9d960c37c6215ced6c1e35d5921e7c6d
tree9251bfffa1eae26c66b379b3d3f296fd3bf3af4b
parentf5d4121c8d582003da689c820914ea81b02c8514
HID: udraw-ps3: 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>
Acked-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-udraw-ps3.c