|
From: <wis...@us...> - 2015-07-29 10:31:11
|
Revision: 13133
http://sourceforge.net/p/xoops/svn/13133
Author: wishcraft
Date: 2015-07-29 10:31:09 +0000 (Wed, 29 Jul 2015)
Log Message:
-----------
Signed 2.1.9 Final Major - Puesdo.legal.binding.v2
Modified Paths:
--------------
XoopsModules/signed/trunk/modules/signed/admin/admin_header.php
XoopsModules/signed/trunk/modules/signed/api/index.php
XoopsModules/signed/trunk/modules/signed/api/validate.php
XoopsModules/signed/trunk/modules/signed/class/cryptus/aesctr/aesctr.php
XoopsModules/signed/trunk/modules/signed/class/cryptus/cryptus.php
XoopsModules/signed/trunk/modules/signed/class/cryptus/mcrypt/mcrypt.php
XoopsModules/signed/trunk/modules/signed/class/cryptus/mysql/mysql.php
XoopsModules/signed/trunk/modules/signed/class/cryptus/openssl/openssl.php
XoopsModules/signed/trunk/modules/signed/class/cryptus/rsa-openssl/rsa-openssl.php
XoopsModules/signed/trunk/modules/signed/class/signedapi.php
XoopsModules/signed/trunk/modules/signed/class/signedformloader.php
XoopsModules/signed/trunk/modules/signed/class/signedstorage.php
XoopsModules/signed/trunk/modules/signed/class/xcp/debug_base.php
XoopsModules/signed/trunk/modules/signed/class/xcp/debug_leaver.php
XoopsModules/signed/trunk/modules/signed/class/xcp/index.php
XoopsModules/signed/trunk/modules/signed/dojsonids.php
XoopsModules/signed/trunk/modules/signed/dojsonoperations.php
XoopsModules/signed/trunk/modules/signed/generator.php
XoopsModules/signed/trunk/modules/signed/include/blowfish-salt.php
XoopsModules/signed/trunk/modules/signed/include/common.php
XoopsModules/signed/trunk/modules/signed/include/configs.php
XoopsModules/signed/trunk/modules/signed/include/form-object.php
XoopsModules/signed/trunk/modules/signed/include/functions.php
XoopsModules/signed/trunk/modules/signed/language/english/admin.php
XoopsModules/signed/trunk/modules/signed/language/english/modinfo.php
XoopsModules/signed/trunk/modules/signed/sql/mysql.sql
XoopsModules/signed/trunk/modules/signed/templates/common/canvas.php
XoopsModules/signed/trunk/modules/signed/xoops_version.php
Modified: XoopsModules/signed/trunk/modules/signed/admin/admin_header.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/admin/admin_header.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/admin/admin_header.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -19,14 +19,13 @@
* @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
+
- define("_PATH_ROOT", dirname(__DIR__));
+ $path = dirname(dirname(dirname(dirname(__FILE__))));
+ include_once $path . '/mainfile.php';
+ include_once $path . '/include/cp_functions.php';
+ require_once $path . '/include/cp_header.php';
- require_once '../../../mainfile.php';
- require_once '../../../include/cp_functions.php';
- require_once '../../../include/cp_header.php';
-
-
global $xoopsModule;
$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
Modified: XoopsModules/signed/trunk/modules/signed/api/index.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/api/index.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/api/index.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -19,10 +19,12 @@
* @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
-
+header('Content-type: application/json');
define('_SIGNED_EVENT_SYSTEM', 'api');
define('_SIGNED_EVENT_TYPE', 'help');
require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'header.php';
+ini_set("zlib.output_compression", 'Off');
+ini_set("zlib.output_compression_level", -1);
require dirname(__FILE__) . _DS_ . 'validate.php';
require _PATH_TEMPLATES . _DS_ . 'common' . _DS_ . 'api.php';
require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'footer.php';
Modified: XoopsModules/signed/trunk/modules/signed/api/validate.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/api/validate.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/api/validate.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -19,7 +19,7 @@
* @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
-
+
if (defined("_SIGNED_API_ENABLED")) {
if (constant("_SIGNED_API_ENABLED")==false)
{
Modified: XoopsModules/signed/trunk/modules/signed/class/cryptus/aesctr/aesctr.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/cryptus/aesctr/aesctr.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/cryptus/aesctr/aesctr.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -123,7 +123,7 @@
*/
function getAlgorithms()
{
- return array(basename(__DIR__));
+ return array(dirname(__DIR__));
}
/**
@@ -132,9 +132,9 @@
*/
function getFileExtensions()
{
- return array( basename(__DIR__) . '.128' => array("keyen"=>128, "salt" => SIGNED_BLOWFISH_SALT),
- basename(__DIR__) . '.192' => array("keyen"=>192, "salt" => SIGNED_BLOWFISH_SALT),
- basename(__DIR__) . '.256' => array("keyen"=>256, "salt" => SIGNED_BLOWFISH_SALT));
+ return array( dirname(__DIR__) . '.128' => array("keyen"=>128, "salt" => SIGNED_BLOWFISH_SALT),
+ dirname(__DIR__) . '.192' => array("keyen"=>192, "salt" => SIGNED_BLOWFISH_SALT),
+ dirname(__DIR__) . '.256' => array("keyen"=>256, "salt" => SIGNED_BLOWFISH_SALT));
}
/**
Modified: XoopsModules/signed/trunk/modules/signed/class/cryptus/cryptus.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/cryptus/cryptus.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/cryptus/cryptus.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -19,10 +19,14 @@
* @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
+
+if (!class_exists("signedCryptus"))
+ die('Signed Cryptus Library objectivity need to be loaded first - Restricted Access!');
-require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'signedlists.php';
+if (!class_exists("signedCryptusHandler"))
+ die('Signed Cryptus handler need to be loaded first - Restricted Access!');
-class signedCryptusLibraries extends signedCryptus
+class signedCryptusLibraries extends signedCryptusHandler
{
@@ -47,29 +51,27 @@
*/
function __construct()
{
- foreach(signedLists::getDirListAsArray(__DIR__) as $key => $folder)
+ foreach($this->getDirListAsArray(__DIR__) as $key => $folder)
{
if (file_exists($cipherlib = __DIR__ . DIRECTORY_SEPARATOR . $folder . DIRECTORY_SEPARATOR . $folder . ".php"))
{
$pass = true;
- require_once $cipherlib;
- $class_name = "signedCryptus" . ucfirst(str_replace(array(" "), "", ucwords(str_replace(array("-", ".", "_"), " ", $folder))));
+ include_once $cipherlib;
+ $class_name = "signedCryptus" . str_replace(array(" "), "", ucwords(str_replace(array("-", ".", "_"), " ", $folder)));
if (class_exists($class_name))
{
$this->cipherobjs[$folder] = new $class_name();
if (count($this->cipherobjs[$folder]->phplibry)>0)
{
foreach($this->cipherobjs[$folder]->phplibry as $extension)
- if (!empty($extension))
- if (!extension_loaded($extension))
- $pass = false;
+ if (!extension_loaded($extension))
+ $pass = false;
}
if (count($this->cipherobjs[$folder]->phpfuncs)>0)
{
- foreach($this->cipherobjs[$folder]->phpfuncs as $function)
- if (!empty($function))
- if (!function_exists($function))
- $pass = false;
+ foreach($this->cipherobjs[$folder]->phpfuncs as $function)
+ if (!function_exists($function))
+ $pass = false;
}
if ($pass==true)
{
@@ -96,6 +98,9 @@
*/
static function getInstance()
{
+ ini_set('display_errors', true);
+ error_reporting(E_ERROR);
+
static $object = NULL;
if (!is_object($object))
$object = new signedCryptusLibraries();
@@ -107,41 +112,12 @@
*
* @return multitype:multitype:number string
*/
- function encrypt($extension = '', $data = '', $key = '')
- {
- $parts = explode('.', $extension);
- if (!isset($this->cipherobjs[$parts[0]]))
- return $data;
- $extensions = $this->cipherobjs[$parts[0]]->getFileExtensions();
- return $this->cipherobjs[$parts[0]]->crypt($data, $key, $extensions[$extension]['cipher'], $extensions[$extension]['mode']);
- }
-
-
- /**
- *
- * @return multitype:multitype:number string
- */
- function decrypt($extension = '', $data = '', $key = '')
+ static function getKeyBitz($extensions = array())
{
- $parts = explode('.', $extension);
- if (!isset($this->cipherobjs[$parts[0]]))
- return $data;
- $extensions = $this->cipherobjs[$parts[0]]->getFileExtensions();
- return $this->cipherobjs[$parts[0]]->decrypt($data, $key, $extensions[$extension]['cipher'], $extensions[$extension]['mode']);
- }
-
-
- /**
- *
- * @return multitype:multitype:number string
- */
- static function getKeysBitz()
- {
- static $bits = array();
- if (empty($bits))
- foreach($this->extensions as $folder => $extensions)
- foreach($extensions as $key => $type)
- $bits["$folder.$key"] = $type['keyen'];
+ if (empty($extensions))
+ return false;
+ foreach($extensions as $fileext => $values)
+ $bits[$values["keyen"]] = $fileext;
return $bits;
}
@@ -171,7 +147,6 @@
$result[$this->cipherobjs[$folder]->name . " [*.$extension]"] = $extension;
else
$result[$extension] = $this->cipherobjs[$folder]->name . " [*.$extension]";
- return $result;
}
/*
@@ -195,7 +170,7 @@
{
if ($this->pbkdf2Algorithms()!=false)
return 'pbkdf2';
- return 'simplioKey';
+ return 'simpKey';
}
/**
@@ -208,32 +183,7 @@
*/
function simplioKey($passphrase = '', $salt = '', $key_length = 128, $raw_output = false)
{
-
- if (empty($passphrase) || empty($salt))
- return false;
-
- if($key_length <= 0) {
- $key_length = 128;
- }
-
- while(strlen($passphrase)<$key_length)
- $passphrase = $passphrase . $passphrase;
-
- while(strlen($salt)<$key_length)
- $salt = $salt . $salt;
-
- $output = '';
- for($rt=0;$rt<=$key_length;$rt++)
- {
- $output = $output . (substr($passphrase, $rt, 1) ^ substr($salt, strlen($salt)- $rt, 1) ^ substr($passphrase, strlen($passphrase) - $rt, 1));
- }
-
- if($raw_output) {
- return substr($output, 0, $key_length);
- }
- else {
- return base64_encode(substr($output, 0, $key_length));
- }
+
}
/**
@@ -287,5 +237,34 @@
else {
return base64_encode(substr($output, 0, $key_length));
}
+ }
+
+
+ /**
+ * gets list of name of directories inside a directory
+ */
+ static function getDirListAsArray($dirname)
+ {
+ $ignored = array(
+ 'cvs' ,
+ '_darcs');
+ $list = array();
+ if (substr($dirname, - 1) != '/') {
+ $dirname .= '/';
+ }
+ if ($handle = opendir($dirname)) {
+ while ($file = readdir($handle)) {
+ if (substr($file, 0, 1) == '.' || in_array(strtolower($file), $ignored))
+ continue;
+ if (is_dir($dirname . $file)) {
+ $list[$file] = $file;
+ }
+ }
+ closedir($handle);
+ asort($list);
+ reset($list);
+ }
+
+ return $list;
}
}
\ No newline at end of file
Modified: XoopsModules/signed/trunk/modules/signed/class/cryptus/mcrypt/mcrypt.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/cryptus/mcrypt/mcrypt.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/cryptus/mcrypt/mcrypt.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -102,7 +102,7 @@
function getAlgorithms()
{
- return array(basename(__DIR__) => mcrypt_list_algorithms());
+ return array(dirname(__DIR__) => mcrypt_list_algorithms());
}
/**
@@ -117,7 +117,7 @@
foreach($algorithms as $id => $cipher)
foreach(mcrypt_list_modes() as $kiey => $mode)
if (($bitz == mcrypt_get_key_size($cipher, $mode)) > 0 )
- $extensions[basename(__DIR__) . '.' . ".$mode.$bitz".str_replace(array(" "), "", ucwords(str_replace(array("-", ".", "_"), " ", $cipher)))] = array("keyen"=>$bitz, "mode"=>$mode, "cipher" => $cipher, "salt" => SIGNED_BLOWFISH_SALT);
+ $extensions[dirname(__DIR__) . '.' . ".$mode.$bitz".str_replace(array(" "), "", ucwords(str_replace(array("-", ".", "_"), " ", $cipher)))] = array("keyen"=>$bitz, "mode"=>$mode, "cipher" => $cipher, "salt" => SIGNED_BLOWFISH_SALT);
return $extensions;
}
@@ -181,7 +181,7 @@
* @param unknown_type $bitz
* @return boolean
*/
- function decrypt($data = '', $key = '', $cipher = '',$mode = '')
+ function decrypt($data = '', $key = '', $mode = '', $cipher = '',$mode = '')
{
if (($bitz = parent::getKeiyeLength($key, array_key($this->getKeyBitz($cipher, $mode))))>0)
{
Modified: XoopsModules/signed/trunk/modules/signed/class/cryptus/mysql/mysql.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/cryptus/mysql/mysql.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/cryptus/mysql/mysql.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -42,13 +42,13 @@
*
* @var string
*/
- var $encryptsql = "SELECT %s(\"%s\", \"%s\") as `encrypt`";
+ var $encryptsql = "SELECT COMPRESS(%s(\"%s\", \"%s\")) as `encrypt`";
/**
*
* @var string
*/
- var $decryptsql = "SELECT %s(\"%s\", \"%s\") as `decrypt`";
+ var $decryptsql = "SELECT UNCOMPRESS(%s(\"%s\", \"%s\")) as `decrypt`";
/**
*
@@ -112,7 +112,9 @@
*/
function getAlgorithms()
{
- return array(basename(__DIR__) => array( 'encode'=>array("encrypt"=>"ENCODE","decrypt"=>"DECODE")));
+ return array(dirname(__DIR__) => array( 'code.128'=>array("encrypt"=>"ENCODE","decrypt"=>"DECODE"),
+ 'des.192'=>array("encrypt"=>"AES_ENCRYPT","decrypt"=>"AES_DECRYPT"),
+ 'aes.256'=>array("encrypt"=>"AES_ENCRYPT","decrypt"=>"AES_DECRYPT")));
}
/**
@@ -121,7 +123,9 @@
*/
function getFileExtensions()
{
- return array( basename(__DIR__) . '.encode' => array("keyen"=>128, "salt" => SIGNED_BLOWFISH_SALT));
+ return array( dirname(__DIR__) . '.code.128' => array("keyen"=>128, "salt" => SIGNED_BLOWFISH_SALT),
+ dirname(__DIR__) . '.des.192' => array("keyen"=>192, "salt" => SIGNED_BLOWFISH_SALT),
+ dirname(__DIR__) . '.aes.256' => array("keyen"=>256, "salt" => SIGNED_BLOWFISH_SALT));
}
Modified: XoopsModules/signed/trunk/modules/signed/class/cryptus/openssl/openssl.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/cryptus/openssl/openssl.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/cryptus/openssl/openssl.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -103,7 +103,7 @@
*/
function getAlgorithms()
{
- return array(basename(__DIR__) => array( 'openssl' => openssl_get_cipher_methods() ));
+ return array(dirname(__DIR__) => array( 'openssl' => openssl_get_cipher_methods() ));
}
/**
@@ -131,7 +131,7 @@
foreach($this->getAlgorithms() as $folder => $algorithms)
foreach($algorithms as $id => $cipher)
if (($bitz == openssl_cipher_iv_length($cipher) * 8) > 0 )
- $extensions[basename(__DIR__) . '.' . ".$bitz".str_replace(array(" "), "", ucwords(str_replace(array("-", ".", "_"), " ", $cipher)))] = array("keyen"=>$bitz, "cipher" => $cipher, "salt" => SIGNED_BLOWFISH_SALT);
+ $extensions[dirname(__DIR__) . '.' . ".$bitz".str_replace(array(" "), "", ucwords(str_replace(array("-", ".", "_"), " ", $cipher)))] = array("keyen"=>$bitz, "cipher" => $cipher, "salt" => SIGNED_BLOWFISH_SALT);
return $extensions;
}
Modified: XoopsModules/signed/trunk/modules/signed/class/cryptus/rsa-openssl/rsa-openssl.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/cryptus/rsa-openssl/rsa-openssl.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/cryptus/rsa-openssl/rsa-openssl.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -101,7 +101,7 @@
*/
function getAlgorithms()
{
- return array(basename(__DIR__) => array( 'rsa-ssl' => array() ));
+ return array(dirname(__DIR__) => array( 'rsa-ssl' => array() ));
}
/**
@@ -114,7 +114,7 @@
$confighandler = xoops_gethandler('config');
$signed = $modulehandler->getByDirname('signed');
$configs = $confighandler->getConfigLists($signed->getVar('mid'));
- return array( basename(__DIR__) . '.rsa-ssl' => array("keyen"=>"cert", "cert" => $configs['pem-key']));
+ return array( dirname(__DIR__) . '.rsa-ssl' => array("keyen"=>"cert", "cert" => $configs['pem-key']));
}
/**
Modified: XoopsModules/signed/trunk/modules/signed/class/signedapi.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/signedapi.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/signedapi.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -22,20 +22,6 @@
defined('_PATH_ROOT') or die('Restricted access');
-
-/**
- * Opens Access Origin Via networking Route NPN
- */
-header('Access-Control-Allow-Origin: *');
-header('Origin: *');
-
-/**
- * Turns of GZ Lib Compression for Document Incompatibility
- */
-ini_set("zlib.output_compression", 'Off');
-ini_set("zlib.output_compression_level", -1);
-
-
/**
*
*/
Modified: XoopsModules/signed/trunk/modules/signed/class/signedformloader.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/signedformloader.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/signedformloader.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -22,36 +22,36 @@
xoops_load('XoopsFormLoader');
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('Form') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('ThemeForm') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('SimpleForm') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormElement') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormElementTray') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormLabel') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormCheckBox') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormPassword') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormButton') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormButtonTray') . '.php'; // To be cleaned
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormHidden') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormFile') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormRadio') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormRadioYN') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormSelect') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormSelectMatchOption') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormSelectCountry') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormSelectTimeZone') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormSelectEditor') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormSelectEnumerator') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormSelectMonths') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormSelectYears') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormText') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormTextArea') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormTextDateSelect') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormDhtmlTextArea') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormDateTime') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormHiddenToken') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormColorPicker') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormCaptcha') . '.php';
-include_once __DIR__ . DIRECTORY_SEPARATOR . 'signedform' . DIRECTORY_SEPARATOR . strtolower('FormEditor') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('Form') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('ThemeForm') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('SimpleForm') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormElement') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormElementTray') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormLabel') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormCheckBox') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormPassword') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormButton') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormButtonTray') . '.php'; // To be cleaned
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormHidden') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormFile') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormRadio') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormRadioYN') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormSelect') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormSelectMatchOption') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormSelectCountry') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormSelectTimeZone') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormSelectEditor') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormSelectEnumerator') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormSelectMonths') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormSelectYears') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormText') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormTextArea') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormTextDateSelect') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormDhtmlTextArea') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormDateTime') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormHiddenToken') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormColorPicker') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormCaptcha') . '.php';
+include_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedform' . _DS_ . strtolower('FormEditor') . '.php';
?>
\ No newline at end of file
Modified: XoopsModules/signed/trunk/modules/signed/class/signedstorage.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/signedstorage.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/signedstorage.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -173,12 +173,6 @@
return $data;
}
- /**
- *
- * @param unknown_type $path
- * @param unknown_type $filetitle
- * @return string|boolean
- */
function file_exists($path = '', $filetitle = '')
{
foreach($this->_methods as $extension => $function)
@@ -384,19 +378,7 @@
{
if (!file_exists($filename))
return false;
-
$data = file_get_contents($filename);
- $file = basename($filename);
- $path = str_replace(array($file, XOOPS_VAR_PATH), "", $filename);
- $keiye_handler = xoops_getmodulehandler('keiyes', 'signed');
- $results = $keiye_handler->retieveKeiye($file, $path);
- $extension = $results['algorithm'].'.'.$results['cipher'];
- if (!empty($extension) && $extension != '.')
- {
- $cryptus_handler = xoops_getmodulehandler('cryptus', 'signed');
- $data = $cryptus_handler->cryptolibs->decrypt($extension, $data, $results['key']);
- }
-
if ($GLOBALS['logger'] = signedLogger::getInstance())
$GLOBALS['logger']->logBytes(strlen($data), 'io-read');
return $data;
@@ -416,75 +398,13 @@
if (empty($content))
return false;
- $file = basename($filename);
- $path = str_replace(array($file, XOOPS_VAR_PATH), "", $filename);
- $keiye_handler = xoops_getmodulehandler('keiyes', 'signed');
- $algorithm = '';
- $cipher = '';
- $key = '';
- $sealmd5 = $openmd5 = md5($content);
- if ($_SESSION['signed']['encryption'])
- {
- $cryptus_handler = xoops_getmodulehandler('cryptus', 'signed');
- $parts = explode(".", $ext = $cryptus_handler->getRandomExtension());
- $bitz = $cryptus_handler->cryptolibs->getKeysBitz();
- $keyfunc = $cryptus_handler->cryptolibs->kieyeFunc();
- $key = $cryptus_handler->cryptolibs->$keyfunc(sha1($content).md5($content), SIGNED_BLOWFISH_SALT, $bitz[$ext], true);
- $algorithm = $parts[0];
- unset($parts[0]);
- $cipher = implode('.', $parts);
- $openmd5 = md5($content);
- $sealmd5 = md5($content = $cryptus_handler->cryptolibs->encrypt($ext, $content, $key));
- }
+ $f = fopen($filename, 'w');
+ fwrite($f, $content, strlen($content));
+ fclose($f);
- if (file_put_contents($filename, $content, false))
- {
- $keiye_handler->lodgeKey($file, $path, $algoritm, $cipher, $key, $sealmd5, $openmd5, filesize($filename));
- if ($GLOBALS['logger'] = signedLogger::getInstance())
- $GLOBALS['logger']->logBytes(strlen($content), 'io-write');
- }
+ if ($GLOBALS['logger'] = signedLogger::getInstance())
+ $GLOBALS['logger']->logBytes(strlen($content), 'io-write');
+
return $filename;
}
-
-
- /** function getURL()
- *
- * cURL Routine
- * @return string()
- */
- public static function getURL($uri = '', $timeout = 17, $connectout = 28, $post_data = array(), $getheaders = false)
- {
- if (!function_exists("curl_init"))
- {
- return file_get_contents($uri);
- }
- if (!$uiol = curl_init($uri)) {
- return false;
- }
- curl_setopt($uiol, CURLOPT_POST, (count($post_data)==0?false:true));
- if (count($post_data)!=0)
- curl_setopt($uiol, CURLOPT_POSTFIELDS, http_build_query($post_data));
- curl_setopt($uiol, CURLOPT_CONNECTTIMEOUT, $connectout);
- curl_setopt($uiol, CURLOPT_TIMEOUT, $timeout);
- curl_setopt($uiol, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($uiol, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($uiol, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($uiol, CURLOPT_VERBOSE, $getheaders);
- curl_setopt($uiol, CURLOPT_HEADER, $getheaders);
-
- /**
- * Execute Curl Call
- * @var string
- */
- $response = curl_exec($uiol);
- if ($getheaders==true) {
- $infos = curl_getinfo($uiol);
- $header = substr($response, 0, curl_getinfo($uiol, CURLINFO_HEADER_SIZE));
- $data = substr($response, curl_getinfo($uiol, CURLINFO_HEADER_SIZE));
- curl_close($uiol);
- return array('info'=>$infos, 'header' =>$header, 'data' => $data);
- }
- curl_close($uiol);
- return $response;
- }
}
\ No newline at end of file
Modified: XoopsModules/signed/trunk/modules/signed/class/xcp/debug_base.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/xcp/debug_base.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/xcp/debug_base.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -181,7 +181,7 @@
<?php
if (isset($_POST['seed']))
{
- //ini_set('display_errors', true'); ini_set('log_errors', true); ini_set('error_log', XOOPS_ROOT_PATH . DIRETORY_SEPARATOR . 'php-errors.txt'); error_reporting(E_ALL);
+ //;
class xcp
{
Modified: XoopsModules/signed/trunk/modules/signed/class/xcp/debug_leaver.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/xcp/debug_leaver.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/xcp/debug_leaver.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -184,7 +184,7 @@
<?php
if (isset($_POST['charstring'])&&isset($_POST['seed'])&&isset($_POST['length']))
{
- //ini_set('display_errors', true'); ini_set('log_errors', true); ini_set('error_log', XOOPS_ROOT_PATH . DIRETORY_SEPARATOR . 'php-errors.txt'); error_reporting(E_ALL);
+ //;
class xcp
{
@@ -202,7 +202,7 @@
$enum_calc = $enumerator->enum_calc(substr($_POST['charstring'],$i,1),$enum_calc);
}
- //ini_set('display_errors', true'); ini_set('log_errors', true); ini_set('error_log', XOOPS_ROOT_PATH . DIRETORY_SEPARATOR . 'php-errors.txt'); error_reporting(E_ALL);
+ //;
$crc = new xcp_leaver($enum_calc, $xcp_base, $_POST['length']);
echo "Milliseconds: ".(abs((time()+microtime())-$mt)*1000)."\n";
Modified: XoopsModules/signed/trunk/modules/signed/class/xcp/index.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/class/xcp/index.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/class/xcp/index.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -192,7 +192,7 @@
<?php
if (isset($_POST['charstring'])&&isset($_POST['seed'])&&isset($_POST['length']))
{
- //ini_set('display_errors', true'); ini_set('log_errors', true); ini_set('error_log', XOOPS_ROOT_PATH . DIRETORY_SEPARATOR . 'php-errors.txt'); error_reporting(E_ALL);
+ //;
require ('class/xcp.class.php');
set_time_limit(120);
$crc = new xcp($_POST['charstring'], $_POST['seed'], $_POST['length']);
Modified: XoopsModules/signed/trunk/modules/signed/dojsonids.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/dojsonids.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/dojsonids.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -19,22 +19,14 @@
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
+header('Content-type: application/json');
+header('Origin: *');
+header('Access-Control-Allow-Origin: *');
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'common.php';
-$GLOBALS['xoopsLogger']->activated = false;
-/**
- * Opens Access Origin Via networking Route NPN
- */
-header('Access-Control-Allow-Origin: *');
-header('Origin: *');
-
-/**
- * Turns of GZ Lib Compression for Document Incompatibility
- */
ini_set("zlib.output_compression", 'Off');
ini_set("zlib.output_compression_level", -1);
-
+$GLOBALS['xoopsLogger']->activated = false;
ob_end_flush();
-header('Content-type: application/json');
set_time_limit(120);
if (signedCiphers::getInstance()->getHash(_URL_ROOT.date('Ymdh').session_id())==$_REQUEST['passkey']) {
$ids = signedArrays::getInstance()->returnKeyed($_REQUEST['signature_mode'], 'getIdentificationsArray');
Modified: XoopsModules/signed/trunk/modules/signed/dojsonoperations.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/dojsonoperations.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/dojsonoperations.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -18,22 +18,14 @@
* @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
-
+header('Content-type: application/json');
+header('Origin: *');
+header('Access-Control-Allow-Origin: *');
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'common.php';
+ini_set("zlib.output_compression", 'Off');
+ini_set("zlib.output_compression_level", -1);
$GLOBALS['xoopsLogger']->activated = false;
-/**
- * Opens Access Origin Via networking Route NPN
- */
-header('Access-Control-Allow-Origin: *');
-header('Origin: *');
-
-/**
- * Turns of GZ Lib Compression for Document Incompatibility
- */
-ini_set("zlib.output_compression", 'Off');
-ini_set("zlib.output_compression_level", -1);
-header('Content-type: application/json');
set_time_limit(120);
$passed = true;
if (isset($_REQUEST['fields-typal'])) {
Modified: XoopsModules/signed/trunk/modules/signed/generator.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/generator.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/generator.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -19,7 +19,6 @@
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
- $GLOBALS['errors'] = array();
define('_SIGNED_EVENT_SYSTEM', 'generator');
require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'header.php';
Modified: XoopsModules/signed/trunk/modules/signed/include/blowfish-salt.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/include/blowfish-salt.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/include/blowfish-salt.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -15,7 +15,7 @@
* @since 2.07
* @author Simon Roberts <wis...@us...>
* @author Leshy Cipherhouse <le...@sl...>
- * @subpackage module
+ * @subpackage cryptographic
* @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
Modified: XoopsModules/signed/trunk/modules/signed/include/common.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/include/common.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/include/common.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -24,7 +24,10 @@
$GLOBALS['signedBoot'] = microtime(true);
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'mainfile.php');
-
+
+ header('Origin: *');
+ header('Access-Control-Allow-Origin: *');
+
if (!isset($_SESSION["signed"]['configurations']) || empty($_SESSION["signed"]['configurations']))
{
$module_handler = xoops_gethandler('module');
@@ -127,5 +130,5 @@
unset($_SESSION["signed"]['unlink'][$key]);
}
}
-
+
?>
Modified: XoopsModules/signed/trunk/modules/signed/include/configs.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/include/configs.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/include/configs.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -19,7 +19,7 @@
* @description Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
-
+
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'mainfile.php');
//Signee Details
@@ -52,5 +52,5 @@
define('_SIGNED_CARDBOARDFISH_API_URL', $_SESSION["signed"]['configurations']['cardboardfish_uri']);
define('_SIGNED_CARDBOARDFISH_API_USERNAME', $_SESSION["signed"]['configurations']['cardboardfish_user']);
define('_SIGNED_CARDBOARDFISH_API_PASSWORD', $_SESSION["signed"]['configurations']['cardboardfish_pass']);
-
+
?>
Modified: XoopsModules/signed/trunk/modules/signed/include/form-object.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/include/form-object.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/include/form-object.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -135,12 +135,14 @@
function verify($mode = '', $variables = array(), $step = '')
{
-
if (isset($_POST['fields-typal']) && !empty($_POST['fields-typal']))
$typal = $_POST['fields-typal'];
else
$typal = $mode;
+ if ($GLOBALS['security']->check(true, $variables['SIGNED_TOKEN_REQUEST'])==false)
+ return false;
+
$fields = signedArrays::getInstance()->returnKeyed($typal, 'getFieldsArray');
switch(typal) {
case 'identification':
@@ -156,26 +158,6 @@
default:
}
-
- if (isset($variables['fields-required']))
- {
- foreach($variables['fields-required'] as $key => $field)
- {
- if (!in_array($fields[$field]['type'], array('images', 'logos', 'photos')))
- if (empty($variables[$typal][$key]) || strlen($variables[$typal][$key]) == 0) {
- $GLOBALS['errors'][] = "The field titled: <em><strong>" . $fields[$key]['title'] . '</strong></em> ~ is required to continue to the next step!';
- }
- }
- }
- if (isset($variables['upload-fields-required']))
- {
- foreach($variables['upload-fields-required'] as $key => $field)
- {
- if (empty($_FILES[$typal . '-' . $key]['tmp_name']) && $_FILES[$typal . '-' . $key]['size'] == 0) {
- $GLOBALS['errors'][] = "The image/file upload field titled: <em><strong>" . $fields[$key]['title'] . '</strong></em> ~ is required to continue to the next step!';
- }
- }
- }
$validations = signedArrays::getInstance()->returnKeyed($typal, "getValidationsArray");
foreach($variables['fields'] as $key => $field)
@@ -198,7 +180,26 @@
}
}
}
-
+ if (isset($variables['fields-required']))
+ {
+ foreach($variables['fields-required'] as $key => $field)
+ {
+ if (!in_array($fields[$field]['type'], array('images', 'logo', 'photo')))
+ if (empty($variables[$typal][$key]) || strlen($variables[$typal][$key]) == 0) {
+ $GLOBALS['errors'][] = "The field titled: <em><strong>" . $fields[$key]['title'] . '</strong></em> ~ is required to continue to the next step!';
+ }
+ }
+ }
+ if (isset($variables['upload-fields-required']))
+ {
+ foreach($variables['upload-fields-required'] as $key => $field)
+ {
+ if (empty($_FILES[$typal . '-' . $key]['tmp_name']) && $_FILES[$typal . '-' . $key]['size'] == 0) {
+ $GLOBALS['errors'][] = "The image/file upload field titled: <em><strong>" . $fields[$key]['title'] . '</strong></em> ~ is required to continue to the next step!';
+ }
+ }
+ }
+
$fields = signedArrays::getInstance()->returnKeyed($typal, 'getFieldsArray');
$package = array();
foreach($fields as $name => $field) {
Modified: XoopsModules/signed/trunk/modules/signed/include/functions.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/include/functions.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/include/functions.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -20,16 +20,15 @@
* @link https://signed.labs.coop Digital Signature Generation & API Services (Psuedo-legal correct binding measure)
*/
-
+
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'xmlarray.php';
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'xmlwrapper.php';
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'cache' . _DS_ . 'signedcache.php';
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedlists.php';
-
+
/**
* Loads signed Objectivity
*/
-
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedapi.php';
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedarrays.php';
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedcanvas.php';
@@ -41,23 +40,21 @@
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedprompts.php';
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedsecurity.php';
require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedstorage.php';
- require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'cryptus.php';
+ require_once _PATH_ROOT . _DS_ . 'class' . _DS_ . 'signedcryptus.php';
- if (file_exists($blowfish = __DIR__ . DIRECTORY_SEPARATOR . 'blowfish-salt.php'))
- {
+ if (file_exists($blowfish = __DIR__ . DIRECTORY_SEPARATOR . 'blowfish-salt.php'))
require_once($blowfish);
if (constant("SIGNED_BLOWFISH_SALT") != "%%%%%%%%%%%%%%%%%%%%%")
+ chmod($blowfish, 0400);
+ elseif(signedCryptusHandler::writeBlowfishSalts($blowfish))
chmod($blowfish, 0400);
- }
-
+
/**
* gets Instances of signed Objectivity
*/
global $security, $io;
$GLOBALS['security'] = signedSecurity::getInstance();
$GLOBALS['io'] = signedStorage::getInstance(_SIGNED_STORAGE);
-
-
/**
* signed language loader wrapper
@@ -145,80 +142,77 @@
return $mailer;
}
-
/**
* Function to get the base domain name from a URL.
* credit for this function should goto Phosphorus and Lime, it is released under LGPL.
*
* @param string $url the URL to be stripped.
* @return string
+ * @fixed
*/
- function signed_getBaseDomain($url)
+ function signed_getBaseDomain($url, $debug = 0)
{
- static $strata, $fallout, $stratas;
-
- require_once dirname(__DIR__) . 'class'. DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'signedcache.php';
-
- if (empty($strata))
- {
- if (!$strata = SignedCache::read('internets_stratas'))
- {
- if (empty($stratas))
- $stratas = explode("\n", file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'strata-api-uri.diz'));
- shuffle($stratas);
- $attempts = 0;
- while(empty($strata) || $attempts < (count($strata) * 1.65))
- {
- $attempts++;
- $strata = array_keys(unserialize(getURIData($stratas[mt_rand(0, count($stratas)-1)] ."/v1/strata/serial.api", 15, 19)));
- }
- if (!empty($strata))
- SignedCache::write('internets_stratas', $strata, 3600*24*mt(3.75,11));
- }
- }
- if (empty($fallout))
- {
- if (!$fallout = SignedCache::read('internets_fallouts'))
- {
- if (empty($stratas))
- $stratas = explode("\n", file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'strata-api-uri.diz'));
- shuffle($stratas);
- $attempts = 0;
- while(empty($fallout) || $attempts < (count($strata) * 1.65))
- {
- $attempts++;
- $fallout = array_keys(unserialize(getURIData($stratas[mt_rand(0, count($stratas)-1)] ."/v1/fallout/serial.api", 15, 19)));
- }
- if (!empty($fallout))
- SignedCache::write('internets_fallouts', $fallout, 3600*24*mt(3.75,11));
- }
- }
-
- // Get Full Hostname
- $url = strtolower($url);
- $hostname = parse_url($url, PHP_URL_HOST);
- if (!filter_var($hostname, FILTER_VALIDATE_IP) === true)
- return $hostname;
-
- // break up domain, reverse
- $elements = explode('.', $hostname);
- $elements = array_reverse($elements);
-
- // Returns Base Domain
- if (in_array($elements[0], $fallout) && in_array($elements[1], $strata))
- return $elements[2] . '.' . $elements[1] . '.' . $elements[0];
- elseif (in_array($elements[0], $fallout) || in_array($elements[0], $strata))
- return $elements[1] . '.' . $elements[0];
-
- // Nothing Found
- return $hostname;
+ $base_domain = '';
+ $url = strtolower($url);
+
+ if ($G_TLD = signedCache::read('dms_realms_list'))
+ {
+ $G_TLD = array_keys(unserialize(file_get_contents("http://strata.labs.coop/v1/strata/serial.api")));
+ if (empty($G_TLD))
+ $G_TLD = array_keys(unserialize(file_get_contents("https://strata.ringwould.com.au/v1/strata/serial.api")));
+ if (empty($G_TLD))
+ $G_TLD = array_keys(unserialize(file_get_contents("http://strata.ringwould.com.au/v1/strata/serial.api")));
+ signedCache::write('dms_realms_list', $G_TLD, 3600*24*mt(3.75,11));
+ }
+ if ($C_TLD = signedCache::read('fallout_realms_list'))
+ {
+ $C_TLD = array_keys(unserialize(file_get_contents("http://strata.labs.coop/v1/fallout/serial.api")));
+ if (empty($C_TLD))
+ $C_TLD = array_keys(unserialize(file_get_contents("https://strata.ringwould.com.au/v1/fallout/serial.api")));
+ if (empty($C_TLD))
+ $C_TLD = array_keys(unserialize(file_get_contents("http://strata.ringwould.com.au/v1/fallout/serial.api")));
+ signedCache::read('fallout_realms_list', $C_TLD, 3600*24*mt(3.75,11));
+ }
+
+ // get domain
+ if (!$full_domain = signed_getUrlDomain($url)) {
+ return $base_domain;
+ }
+
+ // break up domain, reverse
+ $DOMAIN = explode('.', $full_domain);
+ if ($debug) {
+ //print_r($DOMAIN);
+ }
+ $DOMAIN = array_reverse($DOMAIN);
+ if ($debug) {
+ //print_r($DOMAIN);
+ }
+ // first check for ip address
+ if (count($DOMAIN) == 4 && is_numeric($DOMAIN[0]) && is_numeric($DOMAIN[3])) {
+ return $full_domain;
+ }
+
+ // if only 2 domain parts, that must be our domain
+ if (count($DOMAIN) <= 2) {
+ return $full_domain;
+ }
+
+ /*
+ finally, with 3+ domain parts: obviously D0 is tld now,
+ if D0 = ctld and D1 = gtld, we might have something like com.uk so,
+ if D0 = ctld && D1 = gtld && D2 != 'www', domain = D2.D1.D0 else if D0 = ctld && D1 = gtld && D2 == 'www',
+ domain = D1.D0 else domain = D1.D0 - these rules are simplified below.
+ */
+ if (in_array($DOMAIN[0], $C_TLD) && in_array($DOMAIN[1], $G_TLD) && $DOMAIN[2] != 'www') {
+ $full_domain = $DOMAIN[2] . '.' . $DOMAIN[1] . '.' . $DOMAIN[0];
+ } else {
+ $full_domain = $DOMAIN[1] . '.' . $DOMAIN[0];
+ }
+ // did we succeed?
+ return $full_domain;
}
- /**
- *
- * @param unknown_type $url
- * @return Ambigous <string, mixed>
- */
function signed_getUrlDomain($url)
{
$domain = '';
Modified: XoopsModules/signed/trunk/modules/signed/language/english/admin.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/language/english/admin.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/language/english/admin.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -43,7 +43,6 @@
define('_SIGNED_AM_SIBBLINGS', 'Events in Group');
define('_SIGNED_AM_COMMENT', 'Event comment');
define('_SIGNED_AM_SYSTEM', 'System Type');
- define('_SIGNED_AM_USED', 'Used Signing');
// Dashboard
define('_SIGNED_AM_DASHBOARD', 'Signature(s) Binding Totals');
@@ -62,27 +61,6 @@
define('_SIGNED_AM_TOTAL', 'Total Signatures: %s');
//Footer
- define("_SIGNED_AM_ADMIN_FOOTER", '<div style="text-align: center; font-size: 145%; margin-top: 9px; padding-top: 13px; text-shadow: 2px 1px 1px rgb(193, 104, 233); border-top: 3px dashed #000;">This module is maintained by the <a target="_blank" class="tooltip" rel="external" href="http://chrono.labs.coop/" title="Visit Chronolabs Landing Page">Chronolabs Cooperative</a> inclusive with the <a target="_blank" class="tooltip" rel="external" href="http://xoops.org/" title="Visit XOOPS Community">XOOPS Community</a><br/><a href="http://www.xoops.org" rel="external"><img style="margin-top: 23px;"src="http://xoops.org/images/logo.png" alt="XOOPS" title="XOOPS"></a><br/><a href="http://labs.coop" rel="external"><img style="margin-top: 19px;"src="http://web.labs.coop/image/logo.png" alt="Chronolabs" title="Chronolabs cooperative"></a></div>');
+ define("_SIGNED_AM_ADMIN_FOOTER", '<div style="text-align: center; font-size: 145%; margin-top: 9px; padding-top: 13px; text-shadow: 2px 1px 1px rgb(193, 104, 233); border-top: 3px dashed #000;">This module is maintained by the <a target="_blank" class="tooltip" rel="external" href="http://chrono.labs.coop/" title="Visit Chronolabs Landing Page">Chronolabs Cooperative</a> inclusive with the <a target="_blank" class="tooltip" rel="external" href="http://xoops.org/" title="Visit XOOPS Community">XOOPS Community</a><br/><a href="http://www.xoops.org" rel="external"><img style="margin-top: 23px;"src="http://xoops.org/images/logo.png" alt="XOOPS" title="XOOPS"></a><br/><a href="http://labs.coop" rel="external"><img style="margin-top: 19px;"src="http://web.labs.coop/image/logo.png" alt="Chronolabs" title="Chronolabs cooperative"></a></div>')
- // Salty Generator 2.1.8
- define('_SIGNED_AM_FORM_SALTY_ONE_TITLE', 'Populate your Blowfish Salt Information<br/>\n(careful of same pin if exhumation of previous salt!)');
- define('_SIGNED_AM_FORM_EMAIL', 'Blowfish Salt Email Address');
- define('_SIGNED_AM_FORM_NAME', 'Blowfish Salt Naming');
- define('_SIGNED_AM_FORM_URL', 'Blowfish Salt Site Root URI');
- define('_SIGNED_AM_FORM_PIN', 'Your Blowfish Seal Pin Number');
- define('_SIGNED_AM_FORM_SALT', 'Your Blowfish Salt');
- define('_SIGNED_AM_FORM_SALPHA_H1', 'Blowfish Encryption Salter Wizard');
- define('_SIGNED_AM_FORM_SALPHA_H2', 'Recovery of a Blowfish Salt with this Wizard');
- define('_SIGNED_AM_FORM_SALPHA_P1', 'This is the <strong>Blowfish Encryption Salter Wizard</strong>; which allows you to search for existing salt\'s if you are recovering a system or allows you to assigned and save a new system salt for <em>Signed 2</em>!');
- define('_SIGNED_AM_FORM_SALPHA_P2', 'This wizard will allow you to recovery of a Blowfish Salt as long as you remember your pin, without your pin which we do not store only use as an encryption key; there is no way without an accurate pin to recover an existing salt! * CAUTION!!');
- define('_SIGNED_AM_FORM_SSEARCH_H1', 'Searching for Existing Salts!');
- define('_SIGNED_AM_FORM_SSEARCH_P1', 'This will search for a moment then go too the required next steps!');
- define('_SIGNED_AM_FORM_SALTY_NONEFOUND', 'No recovery salts found; moving you to submission and lodgement of a salt to complete wizard!');
- define('_SIGNED_AM_FORM_SALTY_SALTSFOUND', 'There is potentially a blowfish salt to be recovered that has been found; moving you to salt recovery wizard!');
- define('_SIGNED_AM_FORM_SALTY_TRANSFIXED', 'Blowfish Encryption Salt Transfixed on API Recovery Sites and written into code libraries!');
- define('_SIGNED_AM_FORM_SRECOVERY_H1', 'Recover your existing Blowfish Encryption Salt!');
- define('_SIGNED_AM_FORM_SRECOVERY_P1', 'If you have existing signatures on your books or website; then you will have to most likely if your using any systems of the cryptologist libraries included with signed; you will have to recover your existing <strong>Blowfish Encryption Salt!</strong><br/>If you do not then you can simple click on this link: <a href="'. XOOPS_URL . '/modules/signed/admin/salty.php?op=lodge">Lodge a new Encryption Salt</a> and you will start from fresh with the cryptographic engines!');
- define('_SIGNED_AM_FORM_SRECOVERY_P2', 'Below are the salt keys you have a choice from; we do not memories the pin but use it as a cryptographic algorithm; you will have upto five attempts per key to recover one of them; put a pin in select the radio option then press submit to attempt to decipher they blowfish encryption salts from the APIs!');
- define('_SIGNED_AM_FORM_SALTY_RECOVERY_FAILED', 'Recovery Attempt for that Salt Key Failed!');
- define('_SIGNED_AM_FORM_SALTY_START_BEGINNING', 'Recovery Attempt all finished there are no more Salt Key; need too start from the beginning!');
?>
\ No newline at end of file
Modified: XoopsModules/signed/trunk/modules/signed/language/english/modinfo.php
===================================================================
--- XoopsModules/signed/trunk/modules/signed/language/english/modinfo.php 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/language/english/modinfo.php 2015-07-29 10:31:09 UTC (rev 13133)
@@ -29,7 +29,7 @@
// Module Definitions
define('_SIGNED_MI_MODULE_NAME', 'Self Signed');
- define('_SIGNED_MI_MODULE_VERSION', '2.19');
+ define('_SIGNED_MI_MODULE_VERSION', '1.14');
define('_SIGNED_MI_MODULE_DESCRIPTION', 'Final Major Release');
define('_SIGNED_MI_MODULE_AUTHOR', 'Simon Roberts aka. Leshy Cipherhouse <le...@sl...>');
define('_SIGNED_MI_MODULE_CREDITS', 'cipher, MyNamesNot, Wishcraft');
@@ -179,40 +179,19 @@
define('_SIGNED_MI_SMS_CARDBOARDFISH_PASS_DESC', '');
- // Additions in version 2.0.7
+ // Additions in version 2.07
+ // Module Preferences
+ define('_SIGNED_MI_COMPRESSION', 'Enable Data Compression of File Store System');
+ define('_SIGNED_MI_COMPRESSION_DESC', 'This currently uses mysql ~ compress(); decompress() in an open select statement!');
define('_SIGNED_MI_ENCRYPTION', 'Enable Cycling Algorithm File Encryption System');
- define('_SIGNED_MI_ENCRYPTION_DESC', 'Every time a data file is read and re-written then change and cycle the encryption algorithm!');
+ define('_SIGNED_MI_ENCRYPTION_DESC', '');
define('_SIGNED_MI_CIPHERS', 'Cipher algorithms to use in the cycle');
- define('_SIGNED_MI_CIPHERS_DESC', 'Ciphers to support in the algoritm! (Enable mCrypt + OpenSSL For more Algoritms)');
- define('_SIGNED_MI_SSLPEMKEY_PATH', 'OpenSSL-RSA PEM Key path for [rsa-openssl] cipher');
- define('_SIGNED_MI_SSLPEMKEY_PATH_DESC', 'Path to the PEM Key to use for rsa-openssl signing');
+ define('_SIGNED_MI_CIPHERS_DESC', '');
+ define('_SIGNED_MI_SSLPEMKEY_PATH', 'OpenSSL-RSA PEM Key path for [rsa-opensll] cipher');
+ define('_SIGNED_MI_SSLPEMKEY_PATH_DESC', '');
define('_SIGNED_MI_USEOCR', 'Support OCR API');
- define('_SIGNED_MI_USEOCR_DESC', 'Support the <a href="http://jump.labs.coop/ug8oaq" target="_blank">OCR API for identification bitmapping</a>!!');
+ define('_SIGNED_MI_USEOCR_DESC', '');
define('_SIGNED_MI_OCRAPI', 'Path for the Online OCR API');
- define('_SIGNED_MI_OCRAPI_DESC', 'Path for the <a href="http://jump.labs.coop/ug8oaq" target="_blank">OCR API for identification bitmapping</a>!!');
- define('_SIGNED_MI_SALTY_NEEDTOBESET', 'Your blowfish encryption salt needs to be set; you will have to assign one or retrieve your old salt from the API Services!!');
+ define('_SIGNED_MI_OCRAPI_DESC', '');
- // Version 2.1.9
- define('_SIGNED_MI_SMS_SIP_SERVER', 'SIP/VOIP Server Hostname');
- define('_SIGNED_MI_SMS_SIP_SERVER_DESC', 'This is the network routable hostname for the SIP/VOIP Service');
- define('_SIGNED_MI_SMS_SIP_USER', 'SIP/VOIP Service Username');
- define('_SIGNED_MI_SMS_SIP_USER_DESC', 'This is the the username for the SIP/VOIP Service');
- define('_SIGNED_MI_SMS_SIP_PASS', 'SIP/VOIP Service Password');
- define('_SIGNED_MI_SMS_SIP_PASS_DESC', 'This is the username for the SIP/VOIP Service');
-
- // Version 2.1.9 - Configuration Categories
- define('_SIGNED_MI_CONFCAT_SEO', 'URL SEO');
- define('_SIGNED_MI_CONFCAT_SEO_DESC', 'Short URL and .htaccess settings');
- define('_SIGNED_MI_CONFCAT_CIPHERS', 'Cryptographic Engines');
- define('_SIGNED_MI_CONFCAT_CIPHERS_DESC', 'Algorithms and Cipher Options');
- define('_SIGNED_MI_CONFCAT_SYSTEMS', 'General Settings');
- define('_SIGNED_MI_CONFCAT_SYSTEMS_DESC', 'Generalised System Options & Settings');
- define('_SIGNED_MI_CONFCAT_FILES', 'File IO And Stores');
- define('_SIGNED_MI_CONFCAT_FILES_DESC', 'Storage systems and file store methods!');
- define('_SIGNED_MI_CONFCAT_APIS', 'Signed Application Programmable Interfaces');
- define('_SIGNED_MI_CONFCAT_APIS_DESC', 'Option for the self disovery API for Signed!');
- define('_SIGNED_MI_CONFCAT_EMAIL', 'Email options');
- define('_SIGNED_MI_CONFCAT_EMAIL_DESC', 'Settings for Email in Signed!');
- define('_SIGNED_MI_CONFCAT_SMS', 'SMS & Mobile Options');
- define('_SIGNED_MI_CONFCAT_SMS_DESC', 'Settings for SMS & Mobile Messaging!');
?>
\ No newline at end of file
Modified: XoopsModules/signed/trunk/modules/signed/sql/mysql.sql
===================================================================
--- XoopsModules/signed/trunk/modules/signed/sql/mysql.sql 2015-07-27 01:11:43 UTC (rev 13132)
+++ XoopsModules/signed/trunk/modules/signed/sql/mysql.sql 2015-07-29 10:31:09 UTC (rev 13133)
@@ -16,26 +16,6 @@
PRIMARY KEY (`signid`)
) ENGINE=INNODB;
-CREATE TABLE `signed_keiyes` (
- `keiyeid` mediumint(16) unsigned NOT NULL auto_increment,
- `typal` enum('serial', 'xml', 'json', 'raw') NOT NULL default 'raw',
- `path` varchar(200) NOT NULL default '',
- `filename` varchar(200) NOT NULL default '',
- `seal-md5` varchar(32) NOT NULL default '',
- `open-md5` varchar(32) NOT NULL default '',
- `algorithm` varchar(48) NOT NULL default '',
- `cipher` varchar(48) NOT NULL default '',
- `key` tinytext,
- `last-algorithm` varchar(48) NOT NULL default '',
- `last-cipher` varchar(48) NOT NULL default '',
- `last-key` tinytext,
- `bytes` int(24) unsigned NOT NULL default '0',
- `created` int(13) unsigned NOT NULL default '0',
- `accessed` int(13) unsigned NOT NULL default '0',
- PRIMARY KEY (`keiyeid`),
- KEY `indexer` (`path`(14), `filename`(14), `seal-md5`(12))
-) ENGINE=INNODB;
-
CREATE TABLE `signed_events` (
`eventid` mediumint(19) unsigned NOT NULL auto_increment,
`system` varchar(128) NOT NULL defaul...
[truncated message content] |