Require generation of a valid signature_secret during WCFSetup
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 14 Oct 2020 09:41:07 +0000 (11:41 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 15 Oct 2020 14:13:53 +0000 (16:13 +0200)
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php

index e2621d57c0b5d1d774dbae771a0c2eb6c2074d65..80df31f82f12bbf84c556f22cb23eccd46ee931c 100644 (file)
@@ -230,16 +230,10 @@ class PackageInstallationDispatcher {
                                                'mail_admin_address'
                                        ]);
                                        
-                                       try {
-                                               $statement->execute([
-                                                       bin2hex(\random_bytes(20)),
-                                                       'signature_secret'
-                                               ]);
-                                       }
-                                       catch (\Throwable $e) {
-                                               // ignore, the secret will stay empty and crypto operations
-                                               // depending on it will fail
-                                       }
+                                       $statement->execute([
+                                               \bin2hex(\random_bytes(20)),
+                                               'signature_secret'
+                                       ]);
                                        
                                        if (WCF::getSession()->getVar('__wcfSetup_developerMode')) {
                                                $statement->execute([