Permalink
Browse files

Merge branch 'release/1.2.10'

Conflicts:
	OpenVBX/libraries/OpenVBX.php
  • Loading branch information...
Gipetto committed Oct 17, 2012
2 parents ee61ff2 + c00f757 commit fb35e1d6d553f02f7dd9d8a5b7de3d4f5fd7772d
Showing with 4,744 additions and 558 deletions.
  1. +1 −0 .gitignore
  2. +16 −0 CHANGELOG.markdown
  3. +8 −8 OpenVBX/config/countrycodes.php
  4. +1 −1 OpenVBX/config/version.php
  5. +2 −1 OpenVBX/controllers/install.php
  6. +2 −2 OpenVBX/controllers/settings/site.php
  7. +16 −2 OpenVBX/libraries/OpenVBX.php
  8. +112 −58 OpenVBX/libraries/Services/Twilio.php
  9. +0 −78 OpenVBX/libraries/Services/Twilio/ArrayDataProxy.php
  10. +35 −8 OpenVBX/libraries/Services/Twilio/AutoPagingIterator.php
  11. +0 −163 OpenVBX/libraries/Services/Twilio/CachingDataProxy.php
  12. 0 OpenVBX/libraries/Services/Twilio/Capability.php
  13. +0 −44 OpenVBX/libraries/Services/Twilio/DataProxy.php
  14. +23 −10 OpenVBX/libraries/Services/Twilio/InstanceResource.php
  15. +99 −81 OpenVBX/libraries/Services/Twilio/ListResource.php
  16. +2 −8 OpenVBX/libraries/Services/Twilio/Page.php
  17. 0 OpenVBX/libraries/Services/Twilio/PartialApplicationHelper.php
  18. 0 OpenVBX/libraries/Services/Twilio/RequestValidator.php
  19. +55 −33 OpenVBX/libraries/Services/Twilio/Resource.php
  20. +9 −8 OpenVBX/libraries/Services/Twilio/Rest/Account.php
  21. 0 OpenVBX/libraries/Services/Twilio/Rest/Accounts.php
  22. 0 OpenVBX/libraries/Services/Twilio/Rest/Application.php
  23. 0 OpenVBX/libraries/Services/Twilio/Rest/Applications.php
  24. +1 −1 OpenVBX/libraries/Services/Twilio/Rest/AuthorizedConnectApps.php
  25. 0 OpenVBX/libraries/Services/Twilio/Rest/AvailablePhoneNumber.php
  26. +17 −1 OpenVBX/libraries/Services/Twilio/Rest/AvailablePhoneNumbers.php
  27. +4 −4 OpenVBX/libraries/Services/Twilio/Rest/Call.php
  28. +3 −2 OpenVBX/libraries/Services/Twilio/Rest/Calls.php
  29. +1 −1 OpenVBX/libraries/Services/Twilio/Rest/Conference.php
  30. 0 OpenVBX/libraries/Services/Twilio/Rest/Conferences.php
  31. +1 −1 OpenVBX/libraries/Services/Twilio/Rest/ConnectApps.php
  32. 0 OpenVBX/libraries/Services/Twilio/Rest/IncomingPhoneNumber.php
  33. 0 OpenVBX/libraries/Services/Twilio/Rest/IncomingPhoneNumbers.php
  34. +22 −0 OpenVBX/libraries/Services/Twilio/Rest/Member.php
  35. +22 −0 OpenVBX/libraries/Services/Twilio/Rest/Members.php
  36. 0 OpenVBX/libraries/Services/Twilio/Rest/Notification.php
  37. 0 OpenVBX/libraries/Services/Twilio/Rest/Notifications.php
  38. 0 OpenVBX/libraries/Services/Twilio/Rest/OutgoingCallerId.php
  39. 0 OpenVBX/libraries/Services/Twilio/Rest/OutgoingCallerIds.php
  40. 0 OpenVBX/libraries/Services/Twilio/Rest/Participant.php
  41. +4 −0 OpenVBX/libraries/Services/Twilio/Rest/Participants.php
  42. +10 −0 OpenVBX/libraries/Services/Twilio/Rest/Queue.php
  43. +19 −0 OpenVBX/libraries/Services/Twilio/Rest/Queues.php
  44. 0 OpenVBX/libraries/Services/Twilio/Rest/Recording.php
  45. 0 OpenVBX/libraries/Services/Twilio/Rest/Recordings.php
  46. 0 OpenVBX/libraries/Services/Twilio/Rest/Sandbox.php
  47. 0 OpenVBX/libraries/Services/Twilio/Rest/ShortCode.php
  48. 0 OpenVBX/libraries/Services/Twilio/Rest/ShortCodes.php
  49. 0 OpenVBX/libraries/Services/Twilio/Rest/SmsMessage.php
  50. +4 −10 OpenVBX/libraries/Services/Twilio/Rest/SmsMessages.php
  51. 0 OpenVBX/libraries/Services/Twilio/Rest/Transcription.php
  52. 0 OpenVBX/libraries/Services/Twilio/Rest/Transcriptions.php
  53. +6 −0 OpenVBX/libraries/Services/Twilio/Rest/UsageRecord.php
  54. +33 −0 OpenVBX/libraries/Services/Twilio/Rest/UsageRecords.php
  55. +5 −0 OpenVBX/libraries/Services/Twilio/Rest/UsageTrigger.php
  56. +27 −0 OpenVBX/libraries/Services/Twilio/Rest/UsageTriggers.php
  57. 0 OpenVBX/libraries/Services/Twilio/RestException.php
  58. +31 −0 OpenVBX/libraries/Services/Twilio/TimeRangeResource.php
  59. +6 −2 OpenVBX/libraries/Services/Twilio/TinyHttp.php
  60. +33 −1 OpenVBX/libraries/Services/Twilio/Twiml.php
  61. +20 −0 OpenVBX/libraries/Services/Twilio/UsageResource.php
  62. +3,849 −0 OpenVBX/libraries/Services/cacert.pem
  63. +0 −19 OpenVBX/libraries/Services/twilio_ssl_certificate.crt
  64. +1 −1 OpenVBX/libraries/Template.php
  65. +5 −3 OpenVBX/models/vbx_device.php
  66. +1 −1 OpenVBX/models/vbx_message.php
  67. +2 −1 OpenVBX/views/emails/message.php
  68. +2 −1 OpenVBX/views/settings/site.php
  69. BIN favicon.ico
  70. +1 −1 openvbx.sql
  71. +1 −2 plugins/standard/applets/conference/twiml.php
  72. +1 −1 plugins/standard/applets/conference/ui.php
  73. +15 −0 plugins/timing/applets/timing/twiml.php
  74. +12 −0 plugins/usage/plugin.json
  75. +203 −0 plugins/usage/usage.php
  76. +1 −0 updates/76.sql
View
@@ -6,3 +6,4 @@ audio-uploads/*
apc.php
info.php
memcache.php
+.idea
View
@@ -1,5 +1,21 @@
# OpenVBX Change Log
+## OpenVBX 1.2.10
+
+- Fix improper exception pass through that would show the wrong error message to a user when updating settings.
+- Adding a favicon to help keep server logs quiet.
+- Fix to timing applet to properly handle wrapping around to Sunday.
+- Fix to conference applet to properly set the hasModerator flag and not allow just anyone to start a conference.
+- Disable sandbox display by default. Sandbox is now deprecated by Twilio on all new accounts.
+- Remove call to `uniqid` in conference applet `ui.php` since `uniqid` seems to have issues on different systems. Replaced with call to `mt_rand`.
+- Fix request validation where url rewriting is enabled but the `vbxsite` variable still appears in the request uri parameter.
+- Fix unnecessary failure when trying to install on `localhost`.
+- Fix for emails not containing the properly adjusted message time.
+- Fix device call sequence to respect the sequence when dialing a user.
+- Trust Twilio REST Api objects when scrubbing data.
+- Add sample plugin for Twilio Usage API data.
+
+
## OpenVBX 1.2.9
- Reverted previous change made in 1.2.8 that allowed for GET params in request validations when using pretty urls.
@@ -24,7 +24,7 @@
'AT' => array('43'), // Austria
'AU' => array('61'), // Australia
'AW' => array('297'), // Aruba
- 'AX' => array(''), // Åland Islands
+ 'AX' => array('358'), // Åland Islands
'AZ' => array('994'), // Azerbaijan
'BA' => array('387'), // Bosnia and Herzegovina
'BB' => array('1'), // Barbados
@@ -35,7 +35,7 @@
'BH' => array('973'), // Bahrain
'BI' => array('257'), // Burundi
'BJ' => array('229'), // Benin
- 'BL' => array(''), // Saint Barthélemy
+ 'BL' => array('590'), // Saint Barthélemy
'BM' => array('1'), // Bermuda
'BN' => array('673'), // Brunei Darussalam
'BO' => array('591'), // Bolivia, Plurinational State of
@@ -62,7 +62,7 @@
'CR' => array('506'), // Costa Rica
'CU' => array('53'), // Cuba
'CV' => array('238'), // Cape Verde
- 'CW' => array(''), // Curaçao
+ 'CW' => array('599'), // Curaçao
'CX' => array('61'), // Christmas Island
'CY' => array('357'), // Cyprus
'CZ' => array('420'), // Czech Republic
@@ -90,7 +90,7 @@
'GD' => array('1'), // Grenada
'GE' => array('241'), // Georgia
'GF' => array('594'), // French Guiana
- 'GG' => array(''), // Guernsey
+ 'GG' => array('44'), // Guernsey
'GH' => array('233'), // Ghana
'GI' => array('350'), // Gibraltar
'GL' => array('299'), // Greenland
@@ -120,7 +120,7 @@
'IR' => array('98'), // Iran, Islamic Republic of
'IS' => array('354'), // Iceland
'IT' => array('39'), // Italy
- 'JE' => array(''), // Jersey
+ 'JE' => array('44'), // Jersey
'JM' => array('1'), // Jamaica
'JO' => array('962'), // Jordan
'JP' => array('81'), // Japan
@@ -134,7 +134,7 @@
'KR' => array('82'), // Korea, Republic of
'KW' => array('965'), // Kuwait
'KY' => array('1'), // Cayman Islands
- 'KZ' => array(''), // Kazakhstan
+ 'KZ' => array('7'), // Kazakhstan
'LA' => array('856'), // Lao People's Democratic Republic
'LB' => array('961'), // Lebanon
'LC' => array('1'), // Saint Lucia
@@ -150,8 +150,8 @@
'MC' => array('377'), // Monaco
'MD' => array('373'), // Moldova, Republic of
'ME' => array('382'), // Montenegro
- 'MF' => array(''), // Saint Martin (French part)
'MG' => array('261'), // Madagascar
+ 'MF' => array('590'), // Saint Martin (French part)
'MH' => array('692'), // Marshall Islands
'MK' => array('389'), // Macedonia, the former Yugoslav Republic of
'ML' => array('223'), // Mali
@@ -210,7 +210,7 @@
'SG' => array('65'), // Singapore
'SH' => array('290'), // Saint Helena, Ascension and Tristan da Cunha
'SI' => array('386'), // Slovenia
- 'SJ' => array(''), // Svalbard and Jan Mayen
+ 'SJ' => array('47'), // Svalbard and Jan Mayen
'SK' => array('421'), // Slovakia
'SL' => array('232'), // Sierra Leone
'SM' => array('378'), // San Marino
@@ -1,3 +1,3 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
-$config['version'] = '1.2.9';
+$config['version'] = '1.2.10';
@@ -223,7 +223,6 @@ public function setup()
$tplvars = $this->input_args();
$this->run_tests();
- $this->openvbx_settings['application_sid'] = $this->get_application($this->openvbx_settings);
$json['tests'] = $this->tests;
$json['pass'] = $this->pass;
@@ -237,6 +236,8 @@ public function setup()
try
{
+ $this->openvbx_settings['application_sid'] = $this->get_application($this->openvbx_settings);
+
if(!($dbh = @mysql_connect($database['default']['hostname'],
$database['default']['username'],
$database['default']['password'])))
@@ -424,7 +424,7 @@ private function update_application($app_sid)
catch (Exception $e) {
$this->session->set_flashdata('error', 'Could not update '.
'Application: '.$e->getMessage());
- throw new SiteException($e->getMessage());
+ throw new SiteException($e->getMessage(), $e->getCode());
}
}
}
@@ -514,7 +514,7 @@ private function create_application_for_subaccount($tenant_id, $name, $accountSi
}
}
catch (Exception $e) {
- throw new VBX_SettingsException($e->getMessage());
+ throw new VBX_SettingsException($e->getMessage(), $e->getCode());
}
return $application->sid;
@@ -448,15 +448,29 @@ public static function validateRequest($url = false, $post_vars = false)
if ($ci->vbx_settings->get('rewrite_enabled', VBX_PARENT_TENANT) < 1 &&
!empty($_SERVER['QUERY_STRING']) && strpos($url, $_SERVER['QUERY_STRING']) === false)
{
- $url .= '?'.$_SERVER['QUERY_STRING'];
+ $qs = parse_str($_SERVER['QUERY_STRING']);
+
+ // make sure that the rewrite var doesn't stay in the query
+ // string if we're not doing rewriting
+ if ($ci->vbx_settings->get('rewrite_enabled', VBX_PARENT_TENANT) < 1) {
+ foreach ($qs as $name => $value) {
+ if ($name == 'vbxsite') {
+ unset($qs[$name]);
+ }
+ }
+ }
+
+ if (!empty($qs)) {
+ $url .= '?' . http_build_query($qs);
+ }
}
if (empty($post_vars))
{
// we weren't handed post-vars, use the default
$post_vars = $_POST;
}
- error_log($url);
+
return self::$_twilioValidator->validate(self::getRequestSignature(), $url, $post_vars);
}
Oops, something went wrong.

0 comments on commit fb35e1d

Please sign in to comment.