[py] Copy `acceptInsecureCerts` to Options for Firefox. Fixes #8261

Firefox is incredibly strict here so we need to make sure that we
copy it across. When we can delete
capabilities this can be removed.

Cr-Mirrored-From: https://chromium.googlesource.com/external/github.com/SeleniumHQ/selenium
Cr-Mirrored-Commit: c8709bf5c399d016ebb48043356a8030a66b0129
diff --git a/selenium/webdriver/firefox/webdriver.py b/selenium/webdriver/firefox/webdriver.py
index 3141001..01c3c3f 100644
--- a/selenium/webdriver/firefox/webdriver.py
+++ b/selenium/webdriver/firefox/webdriver.py
@@ -167,6 +167,12 @@
             self.profile = firefox_profile
             options.profile = firefox_profile
 
+        # TODO: Remove when we remove capabilities code. Firefox
+        # is being strict here, like it should. When we can remove capabilities
+        # for options this will be good to be deleted.
+        if capabilities.get("acceptInsecureCerts"):
+            options.accept_insecure_certs = capabilities.get("acceptInsecureCerts")
+
         if self.service is None:
             self.service = Service(
                 executable_path,