Skip to content

Commit

Permalink
work around uninitialised state error
Browse files Browse the repository at this point in the history
  • Loading branch information
restena-sw committed Oct 5, 2022
1 parent 076a2e6 commit 43c4e5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Controller/WebAuthn.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public static function workflowStateMachine($state) {
return self::STATE_AUTH_ALLOWMGMT;
} else { // in inflow, allow to check the management box; otherwise,
// only auth
return $state['UseInflowRegistration'] ? self::STATE_AUTH_ALLOWMGMT : self::STATE_AUTH_NOMGMT;
$moduleConfig = Configuration::getOptionalConfig('module_webauthn.php')->toArray();
return $moduleConfig['use_inflow_registration'] ? self::STATE_AUTH_ALLOWMGMT : self::STATE_AUTH_NOMGMT;
}
}

Expand Down
1 change: 0 additions & 1 deletion src/WebAuthn/StaticProcessHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ public static function prepareState(StateData $stateData, array &$state): void
$state['FIDO2SignupChallenge'] = hash('sha512', random_bytes(64));
$state['FIDO2WantsRegister'] = false;
$state['FIDO2AuthSuccessful'] = false;
$state['UseInflowRegistration'] = $stateData->useInflowRegistration;
}
}

0 comments on commit 43c4e5f

Please sign in to comment.