TASK-232 Change encryt with URL_KEY and Deprecate encryptlink
This commit is contained in:
@@ -10,7 +10,7 @@ return [
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
'debug' => env('APP_DEBUG', false),
|
||||
'cache_lifetime' => env('APP_CACHE_LIFETIME', 3600), //laravel 8.x the time parameter is in seconds.
|
||||
'key' => env('APP_KEY', 'base64:rU28h/tElUn/eiLY0qC24jJq1rakvAFRoRl1DWxj/kM='),
|
||||
'key' => env('APP_KEY', 'THVyYW5AU29mdF9PcHRpbXVzUHJpbWU='),
|
||||
'cipher' => 'AES-256-CBC',
|
||||
'timezone' => 'UTC',
|
||||
'providers' => [
|
||||
|
||||
@@ -603,7 +603,7 @@ class WebApplication
|
||||
* Global definitions, before it was the defines.php file
|
||||
*/
|
||||
// URL Key
|
||||
define("URL_KEY", 'c0l0s40pt1mu59r1m3');
|
||||
define('URL_KEY', config('app.key'));
|
||||
|
||||
// Other definitions
|
||||
define('TIMEOUT_RESPONSE', 100); //web service timeout
|
||||
|
||||
@@ -2519,14 +2519,14 @@ class Bootstrap
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypt URL
|
||||
* Encrypt URL DEPRECATED
|
||||
*
|
||||
* @author Fernando Ontiveros Lira <fernando@colosa.com>
|
||||
* @access public
|
||||
* @param string $urlLink
|
||||
* @return string
|
||||
*/
|
||||
public function encryptlink($url)
|
||||
public function encryptlinkDeprecated($url)
|
||||
{
|
||||
if (defined('ENABLE_ENCRYPT') && ENABLE_ENCRYPT == 'yes') {
|
||||
return urlencode(Bootstrap::encrypt($url, URL_KEY));
|
||||
|
||||
@@ -770,14 +770,14 @@ class G
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypt URL
|
||||
* Encrypt URL DEPRECATED
|
||||
*
|
||||
* @author Fernando Ontiveros Lira <fernando@colosa.com>
|
||||
* @access public
|
||||
* @param string $urlLink
|
||||
* @return string
|
||||
*/
|
||||
public static function encryptlink($url)
|
||||
public static function encryptlinkDeprecated($url)
|
||||
{
|
||||
if (defined('ENABLE_ENCRYPT') && ENABLE_ENCRYPT == 'yes') {
|
||||
return urlencode(G::encrypt($url, URL_KEY));
|
||||
|
||||
@@ -5694,9 +5694,6 @@ class XmlFormFieldImage extends XmlFormField
|
||||
public function render($value = null, $owner = null)
|
||||
{
|
||||
$url = G::replaceDataField($this->file, $owner->values);
|
||||
if ($this->home === "methods") {
|
||||
$url = G::encryptlink(SYS_URI . $url);
|
||||
}
|
||||
if ($this->home === "public_html") {
|
||||
$url = '/' . $url;
|
||||
}
|
||||
|
||||
@@ -36,17 +36,11 @@ class XmlFormFieldToolButton extends XmlFormField
|
||||
public function render($value = null, $paramDummy2 = null)
|
||||
{
|
||||
$url = $this->file;
|
||||
if ($this->home === "methods") {
|
||||
$url = G::encryptlink(SYS_URI . $url);
|
||||
}
|
||||
if ($this->home === "public_html") {
|
||||
$url = '/' . $url;
|
||||
}
|
||||
$urlAlt = $this->fileAlt;
|
||||
if ($this->fileAlt !== '') {
|
||||
if ($this->home === "methods") {
|
||||
$urlAlt = G::encryptlink(SYS_URI . $urlAlt);
|
||||
}
|
||||
if ($this->home === "public_html") {
|
||||
$urlAlt = '/' . $urlAlt;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
*/
|
||||
|
||||
// URL Key
|
||||
define("URL_KEY", 'c0l0s40pt1mu59r1m3' );
|
||||
define('URL_KEY', config('app.key'));
|
||||
|
||||
// Other definitions
|
||||
define('TIMEOUT_RESPONSE', 100 ); //web service timeout
|
||||
|
||||
@@ -112,8 +112,6 @@ set_include_path(
|
||||
* Global definitions
|
||||
*/
|
||||
|
||||
// URL Key
|
||||
define("URL_KEY", 'c0l0s40pt1mu59r1m3');
|
||||
|
||||
// Application settings
|
||||
define('TIMEOUT_RESPONSE', 100); //web service timeout in seconds
|
||||
@@ -330,7 +328,6 @@ if (!file_exists(PATH_HTML . 'index.html')) { // if not, create it from template
|
||||
)));
|
||||
}
|
||||
|
||||
|
||||
define('SYS_URI', '/sys' . SYS_TEMP . '/' . SYS_LANG . '/' . SYS_SKIN . '/');
|
||||
|
||||
// defining the serverConf singleton
|
||||
@@ -367,6 +364,9 @@ ini_set('date.timezone', TIME_ZONE); //Set Time Zone
|
||||
|
||||
date_default_timezone_set(TIME_ZONE);
|
||||
|
||||
// URL Key
|
||||
define('URL_KEY', config('app.key'));
|
||||
|
||||
config(['app.timezone' => TIME_ZONE]);
|
||||
|
||||
// Load Language Translation
|
||||
|
||||
Reference in New Issue
Block a user