*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
$params[$paramName] = (string) $params[$paramName];
}
}
- else {// $paramName is not included or ===NULL
+ else {
+ // $paramName is not included or ===NULL
$params[$paramName] = '';
}
$message['payload'][$paramName] = $params[$paramName];
public function validate($token, $params) {
list ($salt, $signature) = explode($this->signDelim, $token);
if (strlen($salt) != self::SALT_LEN) {
- throw new Exception("Invalid salt [$token]=[$salt][$signature]");
+ throw new Exception("Token contains invalid salt [" . urlencode($token) . "]");
}
$newToken = $this->sign($params, $salt);
return ($token == $newToken);