Results

20.03.2018
saml_idp 8.x-1.0-alpha1 :: src/Auth/Source/External.php
    $container = \Drupal::getContainer();
    $request = $container->get('request_stack')->getCurrentRequest();
    if (!$stateId = $request->query->get('State')) {
      throw new SimpleSAML_Error_BadRequest('Missing "State" parameter.');
    }
    /*
     * Once again, note the second parameter to the loadState function. This must
     * match the string we used in the saveState-call above.
     */
01.06.2020
social_auth 8.x-2.x-dev :: src/Controller/OAuth2ControllerBase.php
      // Compare state.
      $state_sent = $this->dataHandler->get('oauth2state');
      $state_received = $this->request->getCurrentRequest()->query->get('state');
      if (empty($state_received) || ($state_received !== $state_sent)) {
        $this->userAuthenticator->nullifySessionKeys();
        $this->setProcessCallbackError('oauth');
        return NULL;
      }
28.11.2024
social_auth_entra_id 1.0.x-dev :: src/Controller/SocialAuthEntraIdController.php
    // Extract OAuth callback parameters.
    $code = $request->query->get('code');
    $state = $request->query->get('state');

    // SECURITY: Validate state parameter to prevent CSRF attacks.
    // The state must match what we stored in session during redirect.
    if (empty($_SESSION['entra_id_oauth_state']) || $state !== $_SESSION['entra_id_oauth_state']) {
      $this->messenger->addError($this->t('Invalid state parameter. Possible CSRF attack.'));
      $this->loggerFactory
30.06.2020
social_auth_vipps 8.x-2.1 :: src/Controller/VippsAuthController.php
   */
  public function processCallback() {
    $retrieved_state = $this->request->getCurrentRequest()->query->get('state');
    $stored_oauth2_states = $this->state()->get(self::OAUTH2_STATES_DRUPAL_STATE_KEY);
    $result = parent::processCallback();
    if ($result !== NULL) {
      // Process passed successfully.
      // Flush state value from the Drupal states, so it cannot be re-used.
      if (isset($stored_oauth2_states[$retrieved_state])) {
06.06.2020
social_post 8.x-2.x-dev :: src/Controller/OAuth2ControllerBase.php
      // Retrieves $_GET['state'].
      $retrievedState = $this->request->getCurrentRequest()->query->get('state');

      if (empty($retrievedState) || ($retrievedState !== $state)) {
        $this->userAuthenticator->nullifySessionKeys();
        $this->messenger()->addError($this->t('Login failed. Invalid OAuth2 state.'));

        return NULL;
21.09.2020
social_post_facebook 8.x-1.x-dev :: src/Controller/FacebookPostController.php
    // Retrieves $_GET['state'].
    $retrievedState = $this->request->getCurrentRequest()->query->get('state');
    if (empty($retrievedState) || ($retrievedState !== $state)) {
      $this->messenger()->addError($this->t('Facebook login failed. Invalid oAuth2 State.'));
      return $this->redirect('user.login');
    }

    $this->facebookManager->authenticate();
19.01.2020
unlock 8.x-1.0 :: src/Client.php
    $code = \Drupal::request()->query->get('code');
    $unlock_token = \Drupal::request()->query->get('state');
    if (!$code || empty($_SESSION['unlock_token']) || ($_SESSION['unlock_token'] !== $unlock_token)) {
      return;
    }
    $ethereum_address = $this->validateAuthCode($code);
    $ethereum_address = Html::escape($ethereum_address);
09.12.2021
userway 8.x-1.4 :: src/Controller/AccountController.php
  public function index() {
    $accountId = Drupal::request()->query->get('accountId');
    $status = Drupal::request()->query->get('state');
    $database = Drupal::database();
    $query = $database->query("SELECT account, status FROM {userway_data}");
    $dbRecord = $query->fetchAssoc();

    if ($dbRecord) {
      $database->update('userway_data')
30.05.2025
webex_client 1.0.5 :: src/Controller/OAuthCallbackController.php
   */
  public function __invoke(Request $request): RedirectResponse {
    $state = $request->query->get('state');
    // Handle OAuth errors.
    if ($request->query->has('error')) {
      $error = $request->query->get('error');
      $this->getLogger('webex_client')->error('OAuth error: @error', [
        '@error' => $request->query->get('error_description', $error),
      ]);
17.10.2020
xero 8.x-2.x-dev :: src/Controller/XeroAuthorizeController.php
  public function authorize(Request $request) {
    $code = $request->query->get('code');
    $state = $request->query->get('state');
    $route = $request->query->get('destination');
    $global = $this->tempStore->get('global');

    try {
      $storedState = $this->tempStore->get('state');
      if ($state !== $storedState) {

Pages

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc