Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweaked validationto not throw random errors on top of stuff

  • Loading branch information...
commit e0f45320a79fcedde1419c2156b3616562211f0b 1 parent 4f50a44
@jmather authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/Majax/Twilio/Client.php
View
3  lib/Majax/Twilio/Client.php
@@ -51,6 +51,9 @@ public function getAccountClient()
*/
public function validateRequest()
{
+ if (!isset($_SERVER['HTTP_HOST']) || !isset($_SERVER['REQUEST_URI']) || !isset($_SERVER['HTTP_X_TWILIO_SIGNATURE']))
+ return false;
+
$validator = new Services_Twilio_RequestValidator($this->auth_token);
$url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$signature = $_SERVER['HTTP_X_TWILIO_SIGNATURE'];
Please sign in to comment.
Something went wrong with that request. Please try again.