Fix assertion in EmailMultifactorMethod::processManagementForm()
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 9 Aug 2021 09:06:39 +0000 (11:06 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 9 Aug 2021 09:09:41 +0000 (11:09 +0200)
wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php

index cde537e50cba992fa83d33cfabe8dc4547789c85..16250fdc8c22f233e56453768ae0d3d8e5d3104d 100644 (file)
@@ -84,7 +84,11 @@ final class EmailMultifactorMethod implements IMultifactorMethod
     public function processManagementForm(IFormDocument $form, Setup $setup): void
     {
         $formData = $form->getData();
-        \assert($formData['action'] === 'enable');
+
+        \assert(
+            !empty($formData['action'])
+            && $formData['action'] === 'enable'
+        );
     }
 
     /**