Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php $map = array( 'PhabricatorAuthProviderOAuthAmazon' => 'PhabricatorAmazonAuthProvi..

Decoded Output download

<?php

$map = array(
  'PhabricatorAuthProviderOAuthAmazon' => 'PhabricatorAmazonAuthProvider',
  'PhabricatorAuthProviderOAuthAsana' => 'PhabricatorAsanaAuthProvider',
  'PhabricatorAuthProviderOAuth1Bitbucket'
    => 'PhabricatorBitbucketAuthProvider',
  'PhabricatorAuthProviderOAuthDisqus' => 'PhabricatorDisqusAuthProvider',
  'PhabricatorAuthProviderOAuthFacebook' => 'PhabricatorFacebookAuthProvider',
  'PhabricatorAuthProviderOAuthGitHub' => 'PhabricatorGitHubAuthProvider',
  'PhabricatorAuthProviderOAuthGoogle' => 'PhabricatorGoogleAuthProvider',
  'PhabricatorAuthProviderOAuth1JIRA' => 'PhabricatorJIRAAuthProvider',
  'PhabricatorAuthProviderLDAP' => 'PhabricatorLDAPAuthProvider',
  'PhabricatorAuthProviderPassword' => 'PhabricatorPasswordAuthProvider',
  'PhabricatorAuthProviderPersona' => 'PhabricatorPersonaAuthProvider',
  'PhabricatorAuthProviderOAuthTwitch' => 'PhabricatorTwitchAuthProvider',
  'PhabricatorAuthProviderOAuth1Twitter' => 'PhabricatorTwitterAuthProvider',
  'PhabricatorAuthProviderOAuthWordPress' => 'PhabricatorWordPressAuthProvider',
);

echo pht('Migrating auth providers...')."
";
$table = new PhabricatorAuthProviderConfig();
$conn_w = $table->establishConnection('w');

foreach (new LiskMigrationIterator($table) as $provider) {
  $provider_class = $provider->getProviderClass();

  queryfx(
    $conn_w,
    'UPDATE %T SET providerClass = %s WHERE id = %d',
    $provider->getTableName(),
    idx($map, $provider_class, $provider_class),
    $provider->getID());
}
 ?>

Did this file decode correctly?

Original Code

<?php

$map = array(
  'PhabricatorAuthProviderOAuthAmazon' => 'PhabricatorAmazonAuthProvider',
  'PhabricatorAuthProviderOAuthAsana' => 'PhabricatorAsanaAuthProvider',
  'PhabricatorAuthProviderOAuth1Bitbucket'
    => 'PhabricatorBitbucketAuthProvider',
  'PhabricatorAuthProviderOAuthDisqus' => 'PhabricatorDisqusAuthProvider',
  'PhabricatorAuthProviderOAuthFacebook' => 'PhabricatorFacebookAuthProvider',
  'PhabricatorAuthProviderOAuthGitHub' => 'PhabricatorGitHubAuthProvider',
  'PhabricatorAuthProviderOAuthGoogle' => 'PhabricatorGoogleAuthProvider',
  'PhabricatorAuthProviderOAuth1JIRA' => 'PhabricatorJIRAAuthProvider',
  'PhabricatorAuthProviderLDAP' => 'PhabricatorLDAPAuthProvider',
  'PhabricatorAuthProviderPassword' => 'PhabricatorPasswordAuthProvider',
  'PhabricatorAuthProviderPersona' => 'PhabricatorPersonaAuthProvider',
  'PhabricatorAuthProviderOAuthTwitch' => 'PhabricatorTwitchAuthProvider',
  'PhabricatorAuthProviderOAuth1Twitter' => 'PhabricatorTwitterAuthProvider',
  'PhabricatorAuthProviderOAuthWordPress' => 'PhabricatorWordPressAuthProvider',
);

echo pht('Migrating auth providers...')."\n";
$table = new PhabricatorAuthProviderConfig();
$conn_w = $table->establishConnection('w');

foreach (new LiskMigrationIterator($table) as $provider) {
  $provider_class = $provider->getProviderClass();

  queryfx(
    $conn_w,
    'UPDATE %T SET providerClass = %s WHERE id = %d',
    $provider->getTableName(),
    idx($map, $provider_class, $provider_class),
    $provider->getID());
}

Function Calls

pht 1

Variables

$map [{'key': 'PhabricatorAuthProviderOAuthAmazon', 'value': 'PhabricatorAmazonAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuthAsana', 'value': 'PhabricatorAsanaAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuth1Bitbucket', 'value': 'PhabricatorBitbucketAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuthDisqus', 'value': 'PhabricatorDisqusAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuthFacebook', 'value': 'PhabricatorFacebookAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuthGitHub', 'value': 'PhabricatorGitHubAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuthGoogle', 'value': 'PhabricatorGoogleAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuth1JIRA', 'value': 'PhabricatorJIRAAuthProvider'}, {'key': 'PhabricatorAuthProviderLDAP', 'value': 'PhabricatorLDAPAuthProvider'}, {'key': 'PhabricatorAuthProviderPassword', 'value': 'PhabricatorPasswordAuthProvider'}, {'key': 'PhabricatorAuthProviderPersona', 'value': 'PhabricatorPersonaAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuthTwitch', 'value': 'PhabricatorTwitchAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuth1Twitter', 'value': 'PhabricatorTwitterAuthProvider'}, {'key': 'PhabricatorAuthProviderOAuthWordPress', 'value': 'PhabricatorWordPressAuthProvider'}]

Stats

MD5 d9934aec6122697fb079b18bb8921c92
Eval Count 0
Decode Time 81 ms