VOD Infomaniak - Version 1.4.0

Version Description

(10/09/2019) = * Correction de bugs

Download this release

Release Info

Developer infomaniak-dev
Plugin Icon wp plugin VOD Infomaniak
Version 1.4.0
Comparing to
See all releases

Code changes from version 1.3.13 to 1.4.0

Files changed (4) hide show
  1. readme.txt +5 -1
  2. vod.api.php +1 -1
  3. vod.class.php +17 -17
  4. vod.php +1 -1
readme.txt CHANGED
@@ -5,11 +5,12 @@ Plugin Name: Vod Infomaniak
5
  Tags: video, manage, infomaniak, vod
6
  Requires at least: 2.8.6
7
  Tested up to: 4.3.1
8
- Stable tag: 1.3.13
9
 
10
 
11
 
12
  Easily embed and manage videos from Infomaniak VOD in your posts, comments and RSS feeds. You need an Infomaniak VOD account to use this plugin.
 
13
 
14
  == Description ==
15
 
@@ -72,6 +73,9 @@ Si vous ne trouvez pas de solution à votre question, vous pouvez aussi nous con
72
 
73
  == Changelog ==
74
 
 
 
 
75
  = 1.3.13 (26/08/2019) =
76
  * update version
77
 
5
  Tags: video, manage, infomaniak, vod
6
  Requires at least: 2.8.6
7
  Tested up to: 4.3.1
8
+ Stable tag: 1.4.0
9
 
10
 
11
 
12
  Easily embed and manage videos from Infomaniak VOD in your posts, comments and RSS feeds. You need an Infomaniak VOD account to use this plugin.
13
+ This plugin communicates directly with infomaniak.com 's services, notably by API, or for uploading videos to their servers.
14
 
15
  == Description ==
16
 
73
 
74
  == Changelog ==
75
 
76
+ = 1.4.0 (10/09/2019) =
77
+ * Correction de bugs
78
+
79
  = 1.3.13 (26/08/2019) =
80
  * update version
81
 
vod.api.php CHANGED
@@ -424,7 +424,7 @@
424
  'trace' => 1,
425
  'encoding' => 'UTF-8'
426
  );
427
- $this->oSoap = new SoapClient ('https://statslive-api.infomaniak.com/vod/vod_soap.wsdl', $aOptions);
428
  try {
429
  $this->oSoap->__setSoapHeaders(array(new SoapHeader ('urn:vod_soap', 'AuthenticationHeader', new SoapVODAuthentificationHeader ($this->sLogin, $this->sPassword, $this->sId))));
430
  return $this->oSoap;
424
  'trace' => 1,
425
  'encoding' => 'UTF-8'
426
  );
427
+ $this->oSoap = new SoapClient ('https://statslive.infomaniak.com/vod/api/vod_soap.wsdl', $aOptions);
428
  try {
429
  $this->oSoap->__setSoapHeaders(array(new SoapHeader ('urn:vod_soap', 'AuthenticationHeader', new SoapVODAuthentificationHeader ($this->sLogin, $this->sPassword, $this->sId))));
430
  return $this->oSoap;
vod.class.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * @author Destrem Kevin + Davide Rubini + Arnaud Toullieux
7
  * @link http://statslive.infomaniak.ch/vod/api/
8
- * @version 1.3.13
9
  * @copyright infomaniak.ch
10
  */
11
  define('VOD_RIGHT_CONTRIBUTOR', 1);
@@ -14,7 +14,7 @@
14
  define('VOD_RIGHT_ADMIN', 4);
15
 
16
  class EasyVod {
17
- public $version = "1.3.13";
18
  private $local_version;
19
  private $plugin_url;
20
  private $options;
@@ -29,7 +29,7 @@
29
  $this->db = new EasyVod_db();
30
  $this->auto_sync = true;
31
  $this->auto_sync_delay = 3600;
32
- define("SALT", "2saLsNw4s4MCG9BVjXCKxvZA");
33
  // Declare variables needed for encryption
34
  if (extension_loaded('openssl')) {
35
  $GLOBALS['encryptCipher'] = 'aes-256-cfb';
@@ -471,7 +471,7 @@
471
  }
472
 
473
  function mce_register($plugin_array) {
474
- $plugin_array["swfobject"] = "http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js";
475
  $plugin_array["vodplugin"] = plugins_url('vod-infomaniak/js/editor_plugin.js');
476
  return $plugin_array;
477
  }
@@ -723,7 +723,7 @@
723
  if ($_POST['sFolderPath'] == -1) {
724
  $this->options['vod_filter_folder'] = "";
725
  } else {
726
- $this->options['vod_filter_folder'] = $_POST['sFolderPath'];
727
  }
728
  update_option($this->key, $this->options);
729
  }
@@ -743,7 +743,7 @@
743
  $this->options['vod_count_playlist'] = $this->db->count_playlists();
744
  $aFolders = $this->db->get_folders();
745
  }
746
- $actionurl = $_SERVER['REQUEST_URI'];
747
  require_once("vod.template.php");
748
  EasyVod_Display::adminMenu($actionurl, $this->options, $site_url, $aFolders);
749
  }
@@ -820,7 +820,7 @@
820
  }
821
  require_once("vod.template.php");
822
  $sPagination = EasyVod_Display::buildPagination($iPage, $iLimit, $iVideoTotal);
823
- $actionurl = $_SERVER['REQUEST_URI'];
824
  EasyVod_Display::managementMenu($actionurl, $sPagination, $this->options, $aVideos);
825
  }
826
  }
@@ -850,20 +850,20 @@
850
  $oApi = $this->getAPI();
851
  $aOptions = array();
852
  if (!empty($_REQUEST['sLogin']) && !empty($_REQUEST['sPassword'])) {
853
- $aOption['login'] = $_REQUEST['sLogin'];
854
- $aOption['password'] = $_REQUEST['sPassword'];
855
  }
856
- $sUrl = $_REQUEST['sProtocole'] . "://" . $_REQUEST['sUrl'];
857
  $bResult = $oApi->importFromUrl($oFolder->sPath, $sUrl, $aOption);
858
  }
859
- $actionurl = $_SERVER['REQUEST_URI'];
860
  delete_transient('vod_last_import');
861
  EasyVod_Display::ImportPopup($actionurl, $oFolder, $bResult);
862
  } else {
863
  //Affichage de la page principal
864
  $aFolders = $this->db->get_folders($this->options['vod_filter_folder']);
865
 
866
- $actionurl = $_SERVER['REQUEST_URI'];
867
  EasyVod_Display::uploadMenu($actionurl, $this->options, $aFolders, $this->getLastImport());
868
  }
869
  }
@@ -911,7 +911,7 @@
911
 
912
 
913
  $aPlaylist = $this->db->get_playlists();
914
- $actionurl = $_SERVER['REQUEST_URI'];
915
  EasyVod_Display::playlistMenu($actionurl, $this->options, $aPlaylist);
916
  }
917
  }
@@ -929,7 +929,7 @@
929
  }
930
  }
931
  $aPlayers = $this->db->get_players();
932
- $actionurl = $_SERVER['REQUEST_URI'];
933
  EasyVod_Display::implementationMenu($actionurl, $this->options, $aPlayers);
934
  }
935
  }
@@ -951,7 +951,7 @@
951
  if (extension_loaded('openssl')) {
952
  return openssl_encrypt($text, $encryptCipher, $encryptPassword, 0, $encryptIv);
953
  } else {
954
- return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
955
  }
956
  }
957
 
@@ -961,7 +961,7 @@
961
  if (extension_loaded('openssl')) {
962
  return openssl_decrypt($text, $encryptCipher, $encryptPassword, 0, $encryptIv);
963
  } else {
964
- return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, SALT, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));
965
  }
966
  }
967
 
@@ -969,7 +969,7 @@
969
  global $wp_query;
970
  $vod_page = isset($wp_query->query_vars['vod_page']) ? $wp_query->query_vars['vod_page'] : "";
971
  if ($vod_page == 'callback') {
972
- include(ABSPATH . 'wp-content/plugins/vod-infomaniak/vod_callback.php');
973
  exit;
974
  }
975
  }
5
  *
6
  * @author Destrem Kevin + Davide Rubini + Arnaud Toullieux
7
  * @link http://statslive.infomaniak.ch/vod/api/
8
+ * @version 1.4.0
9
  * @copyright infomaniak.ch
10
  */
11
  define('VOD_RIGHT_CONTRIBUTOR', 1);
14
  define('VOD_RIGHT_ADMIN', 4);
15
 
16
  class EasyVod {
17
+ public $version = "1.4.0";
18
  private $local_version;
19
  private $plugin_url;
20
  private $options;
29
  $this->db = new EasyVod_db();
30
  $this->auto_sync = true;
31
  $this->auto_sync_delay = 3600;
32
+ define("VOD_IK_SALT", "2saLsNw4s4MCG9BVjXCKxvZA");
33
  // Declare variables needed for encryption
34
  if (extension_loaded('openssl')) {
35
  $GLOBALS['encryptCipher'] = 'aes-256-cfb';
471
  }
472
 
473
  function mce_register($plugin_array) {
474
+ $plugin_array["swfobject"] = plugins_url('vod-infomaniak/js/swfobject.js');
475
  $plugin_array["vodplugin"] = plugins_url('vod-infomaniak/js/editor_plugin.js');
476
  return $plugin_array;
477
  }
723
  if ($_POST['sFolderPath'] == -1) {
724
  $this->options['vod_filter_folder'] = "";
725
  } else {
726
+ $this->options['vod_filter_folder'] = sanitize_text_field($_POST['sFolderPath']);
727
  }
728
  update_option($this->key, $this->options);
729
  }
743
  $this->options['vod_count_playlist'] = $this->db->count_playlists();
744
  $aFolders = $this->db->get_folders();
745
  }
746
+ $actionurl = esc_url_raw($_SERVER['REQUEST_URI']);
747
  require_once("vod.template.php");
748
  EasyVod_Display::adminMenu($actionurl, $this->options, $site_url, $aFolders);
749
  }
820
  }
821
  require_once("vod.template.php");
822
  $sPagination = EasyVod_Display::buildPagination($iPage, $iLimit, $iVideoTotal);
823
+ $actionurl = esc_url_raw($_SERVER['REQUEST_URI']);
824
  EasyVod_Display::managementMenu($actionurl, $sPagination, $this->options, $aVideos);
825
  }
826
  }
850
  $oApi = $this->getAPI();
851
  $aOptions = array();
852
  if (!empty($_REQUEST['sLogin']) && !empty($_REQUEST['sPassword'])) {
853
+ $aOption['login'] = sanitize_user($_REQUEST['sLogin']);
854
+ $aOption['password'] = sanitize_text_field($_REQUEST['sPassword']);
855
  }
856
+ $sUrl = esc_url_raw($_REQUEST['sProtocole'] . "://" . $_REQUEST['sUrl']);
857
  $bResult = $oApi->importFromUrl($oFolder->sPath, $sUrl, $aOption);
858
  }
859
+ $actionurl = esc_url_raw($_SERVER['REQUEST_URI']);
860
  delete_transient('vod_last_import');
861
  EasyVod_Display::ImportPopup($actionurl, $oFolder, $bResult);
862
  } else {
863
  //Affichage de la page principal
864
  $aFolders = $this->db->get_folders($this->options['vod_filter_folder']);
865
 
866
+ $actionurl = esc_url_raw($_SERVER['REQUEST_URI']);
867
  EasyVod_Display::uploadMenu($actionurl, $this->options, $aFolders, $this->getLastImport());
868
  }
869
  }
911
 
912
 
913
  $aPlaylist = $this->db->get_playlists();
914
+ $actionurl = esc_url_raw($_SERVER['REQUEST_URI']);
915
  EasyVod_Display::playlistMenu($actionurl, $this->options, $aPlaylist);
916
  }
917
  }
929
  }
930
  }
931
  $aPlayers = $this->db->get_players();
932
+ $actionurl = esc_url_raw($_SERVER['REQUEST_URI']);
933
  EasyVod_Display::implementationMenu($actionurl, $this->options, $aPlayers);
934
  }
935
  }
951
  if (extension_loaded('openssl')) {
952
  return openssl_encrypt($text, $encryptCipher, $encryptPassword, 0, $encryptIv);
953
  } else {
954
+ return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, VOD_IK_SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
955
  }
956
  }
957
 
961
  if (extension_loaded('openssl')) {
962
  return openssl_decrypt($text, $encryptCipher, $encryptPassword, 0, $encryptIv);
963
  } else {
964
+ return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, VOD_IK_SALT, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));
965
  }
966
  }
967
 
969
  global $wp_query;
970
  $vod_page = isset($wp_query->query_vars['vod_page']) ? $wp_query->query_vars['vod_page'] : "";
971
  if ($vod_page == 'callback') {
972
+ include(plugins_url("vod-infomaniak/vod_callback.php"));
973
  exit;
974
  }
975
  }
vod.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://wordpress.org/extend/plugins/vod-infomaniak/
5
  Description: Easily embed and manage videos from Infomaniak VOD in your posts, comments and RSS feeds. You need an Infomaniak VOD account to use this plugin.
6
  Author: Infomaniak Staff
7
- Version: 1.3.13
8
  Author URI: http://infomaniak.com
9
  */
10
 
4
  Plugin URI: http://wordpress.org/extend/plugins/vod-infomaniak/
5
  Description: Easily embed and manage videos from Infomaniak VOD in your posts, comments and RSS feeds. You need an Infomaniak VOD account to use this plugin.
6
  Author: Infomaniak Staff
7
+ Version: 1.4.0
8
  Author URI: http://infomaniak.com
9
  */
10