mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Don't use deprected "1" value to cURL CURLOPT_SSL_VERIFYHOST
Summary: Fixes T2962. That task discusses this issue. Test Plan: Read php-curl documentation to verify this change makes sense. Sent an email with SES. Reviewers: btrahan, garoevans Reviewed By: garoevans CC: aran Maniphest Tasks: T2962 Differential Revision: https://secure.phabricator.com/D5669
This commit is contained in:
parent
649f5cc178
commit
1e6deff8ba
5 changed files with 84 additions and 1 deletions
2
externals/amazon-ses/ses.php
vendored
2
externals/amazon-ses/ses.php
vendored
|
@ -495,7 +495,7 @@ final class SimpleEmailServiceRequest
|
|||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_USERAGENT, 'SimpleEmailService/php');
|
||||
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, ($this->ses->verifyHost() ? 1 : 0));
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, ($this->ses->verifyHost() ? 2 : 0));
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, ($this->ses->verifyPeer() ? 1 : 0));
|
||||
|
||||
// Request types
|
||||
|
|
|
@ -1556,6 +1556,7 @@ phutil_register_library_map(array(
|
|||
'PholioTransactionType' => 'applications/pholio/constants/PholioTransactionType.php',
|
||||
'PholioTransactionView' => 'applications/pholio/view/PholioTransactionView.php',
|
||||
'PhortuneAccount' => 'applications/phortune/storage/PhortuneAccount.php',
|
||||
'PhortuneAccountBuyController' => 'applications/phortune/controller/PhortuneAccountBuyController.php',
|
||||
'PhortuneAccountEditor' => 'applications/phortune/editor/PhortuneAccountEditor.php',
|
||||
'PhortuneAccountQuery' => 'applications/phortune/query/PhortuneAccountQuery.php',
|
||||
'PhortuneAccountTransaction' => 'applications/phortune/storage/PhortuneAccountTransaction.php',
|
||||
|
@ -3252,6 +3253,7 @@ phutil_register_library_map(array(
|
|||
0 => 'PhortuneDAO',
|
||||
1 => 'PhabricatorPolicyInterface',
|
||||
),
|
||||
'PhortuneAccountBuyController' => 'PhortuneController',
|
||||
'PhortuneAccountEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||
'PhortuneAccountQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhortuneAccountTransaction' => 'PhabricatorApplicationTransaction',
|
||||
|
|
|
@ -35,6 +35,7 @@ final class PhabricatorApplicationPhortune extends PhabricatorApplication {
|
|||
'paymentmethod/' => array(
|
||||
'edit/' => 'PhortunePaymentMethodEditController',
|
||||
),
|
||||
'buy/(?P<id>\d+)/' => 'PhortuneAccountBuyController',
|
||||
),
|
||||
'account/' => array(
|
||||
'' => 'PhortuneAccountListController',
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
final class PhortuneAccountBuyController
|
||||
extends PhortuneController {
|
||||
|
||||
private $accountID;
|
||||
private $id;
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->accountID = $data['accountID'];
|
||||
$this->id = $data['id'];
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$account = id(new PhortuneAccountQuery())
|
||||
->setViewer($user)
|
||||
->withIDs(array($this->accountID))
|
||||
->executeOne();
|
||||
if (!$account) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$account_uri = $this->getApplicationURI($account->getID().'/');
|
||||
|
||||
$product = id(new PhortuneProductQuery())
|
||||
->setViewer($user)
|
||||
->withIDs(array($this->id))
|
||||
->executeOne();
|
||||
if (!$product) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$title = pht('Buy %s', $product->getProductName());
|
||||
|
||||
$payment_method_uri = $this->getApplicationURI(
|
||||
$account->getID().'/paymentmethod/edit/');
|
||||
|
||||
$new_method = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $payment_method_uri,
|
||||
'sigil' => 'workflow',
|
||||
),
|
||||
pht('Add New Payment Method'));
|
||||
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($user)
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel(pht('Stuff'))
|
||||
->setValue($product->getProductName()))
|
||||
->appendChild(
|
||||
id(new AphrontFormRadioButtonControl())
|
||||
->setLabel(pht('Payment Method')))
|
||||
->appendChild(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setValue($new_method))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht("Dolla Dolla Bill Y'all")));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$form,
|
||||
array(
|
||||
'title' => $title,
|
||||
'device' => true,
|
||||
'dust' => true,
|
||||
));
|
||||
|
||||
}
|
||||
}
|
|
@ -45,6 +45,9 @@ final class PhabricatorEdgeConfig extends PhabricatorEdgeConstants {
|
|||
const TYPE_ACCOUNT_HAS_MEMBER = 27;
|
||||
const TYPE_MEMBER_HAS_ACCOUNT = 28;
|
||||
|
||||
const TYPE_PURCAHSE_HAS_CHARGE = 29;
|
||||
const TYPE_CHARGE_HAS_PURCHASE = 30;
|
||||
|
||||
const TYPE_TEST_NO_CYCLE = 9000;
|
||||
|
||||
|
||||
|
@ -125,6 +128,8 @@ final class PhabricatorEdgeConfig extends PhabricatorEdgeConstants {
|
|||
PhabricatorPHIDConstants::PHID_TYPE_CONP => 'ConpherenceThread',
|
||||
PhabricatorPHIDConstants::PHID_TYPE_WIKI => 'PhrictionDocument',
|
||||
PhabricatorPHIDConstants::PHID_TYPE_ACNT => 'PhortuneAccount',
|
||||
PhabricatorPHIDConstants::PHID_TYPE_PRCH => 'PhortunePurchase',
|
||||
PhabricatorPHIDConstants::PHID_TYPE_CHRG => 'PhortuneCharge',
|
||||
);
|
||||
|
||||
$class = idx($class_map, $phid_type);
|
||||
|
|
Loading…
Reference in a new issue