Added more security to the composer vendor folder. Added the SFTP get helper classes, and adapted the compiler to use SFTP
This commit is contained in:
@ -23,12 +23,12 @@
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_vvvvwazwaq_required = false;
|
||||
jform_vvvvwbawar_required = false;
|
||||
jform_vvvvwbbwas_required = false;
|
||||
jform_vvvvwbcwat_required = false;
|
||||
jform_vvvvwbdwau_required = false;
|
||||
jform_vvvvwbewav_required = false;
|
||||
jform_vvvvwazwao_required = false;
|
||||
jform_vvvvwbawap_required = false;
|
||||
jform_vvvvwbbwaq_required = false;
|
||||
jform_vvvvwbcwar_required = false;
|
||||
jform_vvvvwbdwas_required = false;
|
||||
jform_vvvvwbewat_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
@ -59,26 +59,26 @@ function vvvvwaz(location_vvvvwaz)
|
||||
if (location_vvvvwaz == 1)
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').show();
|
||||
if (jform_vvvvwazwaq_required)
|
||||
if (jform_vvvvwazwao_required)
|
||||
{
|
||||
updateFieldRequired('admin_view',0);
|
||||
jQuery('#jform_admin_view').prop('required','required');
|
||||
jQuery('#jform_admin_view').attr('aria-required',true);
|
||||
jQuery('#jform_admin_view').addClass('required');
|
||||
jform_vvvvwazwaq_required = false;
|
||||
jform_vvvvwazwao_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').hide();
|
||||
if (!jform_vvvvwazwaq_required)
|
||||
if (!jform_vvvvwazwao_required)
|
||||
{
|
||||
updateFieldRequired('admin_view',1);
|
||||
jQuery('#jform_admin_view').removeAttr('required');
|
||||
jQuery('#jform_admin_view').removeAttr('aria-required');
|
||||
jQuery('#jform_admin_view').removeClass('required');
|
||||
jform_vvvvwazwaq_required = true;
|
||||
jform_vvvvwazwao_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -90,26 +90,26 @@ function vvvvwba(location_vvvvwba)
|
||||
if (location_vvvvwba == 2)
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').show();
|
||||
if (jform_vvvvwbawar_required)
|
||||
if (jform_vvvvwbawap_required)
|
||||
{
|
||||
updateFieldRequired('site_view',0);
|
||||
jQuery('#jform_site_view').prop('required','required');
|
||||
jQuery('#jform_site_view').attr('aria-required',true);
|
||||
jQuery('#jform_site_view').addClass('required');
|
||||
jform_vvvvwbawar_required = false;
|
||||
jform_vvvvwbawap_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').hide();
|
||||
if (!jform_vvvvwbawar_required)
|
||||
if (!jform_vvvvwbawap_required)
|
||||
{
|
||||
updateFieldRequired('site_view',1);
|
||||
jQuery('#jform_site_view').removeAttr('required');
|
||||
jQuery('#jform_site_view').removeAttr('aria-required');
|
||||
jQuery('#jform_site_view').removeClass('required');
|
||||
jform_vvvvwbawar_required = true;
|
||||
jform_vvvvwbawap_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -134,26 +134,26 @@ function vvvvwbb(type_vvvvwbb)
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
if (jform_vvvvwbbwas_required)
|
||||
if (jform_vvvvwbbwaq_required)
|
||||
{
|
||||
updateFieldRequired('url',0);
|
||||
jQuery('#jform_url').prop('required','required');
|
||||
jQuery('#jform_url').attr('aria-required',true);
|
||||
jQuery('#jform_url').addClass('required');
|
||||
jform_vvvvwbbwas_required = false;
|
||||
jform_vvvvwbbwaq_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').hide();
|
||||
if (!jform_vvvvwbbwas_required)
|
||||
if (!jform_vvvvwbbwaq_required)
|
||||
{
|
||||
updateFieldRequired('url',1);
|
||||
jQuery('#jform_url').removeAttr('required');
|
||||
jQuery('#jform_url').removeAttr('aria-required');
|
||||
jQuery('#jform_url').removeClass('required');
|
||||
jform_vvvvwbbwas_required = true;
|
||||
jform_vvvvwbbwaq_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -189,26 +189,26 @@ function vvvvwbc(type_vvvvwbc)
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').show();
|
||||
if (jform_vvvvwbcwat_required)
|
||||
if (jform_vvvvwbcwar_required)
|
||||
{
|
||||
updateFieldRequired('article',0);
|
||||
jQuery('#jform_article').prop('required','required');
|
||||
jQuery('#jform_article').attr('aria-required',true);
|
||||
jQuery('#jform_article').addClass('required');
|
||||
jform_vvvvwbcwat_required = false;
|
||||
jform_vvvvwbcwar_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').hide();
|
||||
if (!jform_vvvvwbcwat_required)
|
||||
if (!jform_vvvvwbcwar_required)
|
||||
{
|
||||
updateFieldRequired('article',1);
|
||||
jQuery('#jform_article').removeAttr('required');
|
||||
jQuery('#jform_article').removeAttr('aria-required');
|
||||
jQuery('#jform_article').removeClass('required');
|
||||
jform_vvvvwbcwat_required = true;
|
||||
jform_vvvvwbcwar_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -244,26 +244,26 @@ function vvvvwbd(type_vvvvwbd)
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').show();
|
||||
if (jform_vvvvwbdwau_required)
|
||||
if (jform_vvvvwbdwas_required)
|
||||
{
|
||||
updateFieldRequired('content',0);
|
||||
jQuery('#jform_content').prop('required','required');
|
||||
jQuery('#jform_content').attr('aria-required',true);
|
||||
jQuery('#jform_content').addClass('required');
|
||||
jform_vvvvwbdwau_required = false;
|
||||
jform_vvvvwbdwas_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').hide();
|
||||
if (!jform_vvvvwbdwau_required)
|
||||
if (!jform_vvvvwbdwas_required)
|
||||
{
|
||||
updateFieldRequired('content',1);
|
||||
jQuery('#jform_content').removeAttr('required');
|
||||
jQuery('#jform_content').removeAttr('aria-required');
|
||||
jQuery('#jform_content').removeClass('required');
|
||||
jform_vvvvwbdwau_required = true;
|
||||
jform_vvvvwbdwas_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -286,26 +286,26 @@ function vvvvwbe(target_vvvvwbe)
|
||||
if (target_vvvvwbe == 1)
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').show();
|
||||
if (jform_vvvvwbewav_required)
|
||||
if (jform_vvvvwbewat_required)
|
||||
{
|
||||
updateFieldRequired('groups',0);
|
||||
jQuery('#jform_groups').prop('required','required');
|
||||
jQuery('#jform_groups').attr('aria-required',true);
|
||||
jQuery('#jform_groups').addClass('required');
|
||||
jform_vvvvwbewav_required = false;
|
||||
jform_vvvvwbewat_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').hide();
|
||||
if (!jform_vvvvwbewav_required)
|
||||
if (!jform_vvvvwbewat_required)
|
||||
{
|
||||
updateFieldRequired('groups',1);
|
||||
jQuery('#jform_groups').removeAttr('required');
|
||||
jQuery('#jform_groups').removeAttr('aria-required');
|
||||
jQuery('#jform_groups').removeClass('required');
|
||||
jform_vvvvwbewav_required = true;
|
||||
jform_vvvvwbewat_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,9 +31,7 @@ jform_vvvvwatwai_required = false;
|
||||
jform_vvvvwauwaj_required = false;
|
||||
jform_vvvvwavwak_required = false;
|
||||
jform_vvvvwaxwal_required = false;
|
||||
jform_vvvvwaxwam_required = false;
|
||||
jform_vvvvwaywan_required = false;
|
||||
jform_vvvvwaywao_required = false;
|
||||
jform_vvvvwaywam_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
@ -45,14 +43,14 @@ jQuery(document).ready(function()
|
||||
vvvvwau(protocol_vvvvwau);
|
||||
|
||||
var protocol_vvvvwav = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwav = jQuery("#jform_authentication input[type='radio']:checked").val();
|
||||
var authentication_vvvvwav = jQuery("#jform_authentication").val();
|
||||
vvvvwav(protocol_vvvvwav,authentication_vvvvwav);
|
||||
|
||||
var protocol_vvvvwax = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwax = jQuery("#jform_authentication input[type='radio']:checked").val();
|
||||
var authentication_vvvvwax = jQuery("#jform_authentication").val();
|
||||
vvvvwax(protocol_vvvvwax,authentication_vvvvwax);
|
||||
|
||||
var authentication_vvvvway = jQuery("#jform_authentication input[type='radio']:checked").val();
|
||||
var authentication_vvvvway = jQuery("#jform_authentication").val();
|
||||
var protocol_vvvvway = jQuery("#jform_protocol").val();
|
||||
vvvvway(authentication_vvvvway,protocol_vvvvway);
|
||||
});
|
||||
@ -318,7 +316,7 @@ function protocol_vvvvwav_SomeFunc(protocol_vvvvwav)
|
||||
function authentication_vvvvwav_SomeFunc(authentication_vvvvwav)
|
||||
{
|
||||
// set the function logic
|
||||
if (authentication_vvvvwav == 1)
|
||||
if (authentication_vvvvwav == 1 || authentication_vvvvwav == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -366,16 +364,6 @@ function vvvvwax(protocol_vvvvwax,authentication_vvvvwax)
|
||||
jform_vvvvwaxwal_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_public').closest('.control-group').show();
|
||||
if (jform_vvvvwaxwam_required)
|
||||
{
|
||||
updateFieldRequired('public',0);
|
||||
jQuery('#jform_public').prop('required','required');
|
||||
jQuery('#jform_public').attr('aria-required',true);
|
||||
jQuery('#jform_public').addClass('required');
|
||||
jform_vvvvwaxwam_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_secret').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
@ -389,15 +377,6 @@ function vvvvwax(protocol_vvvvwax,authentication_vvvvwax)
|
||||
jQuery('#jform_private').removeClass('required');
|
||||
jform_vvvvwaxwal_required = true;
|
||||
}
|
||||
jQuery('#jform_public').closest('.control-group').hide();
|
||||
if (!jform_vvvvwaxwam_required)
|
||||
{
|
||||
updateFieldRequired('public',1);
|
||||
jQuery('#jform_public').removeAttr('required');
|
||||
jQuery('#jform_public').removeAttr('aria-required');
|
||||
jQuery('#jform_public').removeClass('required');
|
||||
jform_vvvvwaxwam_required = true;
|
||||
}
|
||||
jQuery('#jform_secret').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
@ -417,7 +396,7 @@ function protocol_vvvvwax_SomeFunc(protocol_vvvvwax)
|
||||
function authentication_vvvvwax_SomeFunc(authentication_vvvvwax)
|
||||
{
|
||||
// set the function logic
|
||||
if (authentication_vvvvwax == 2)
|
||||
if (authentication_vvvvwax == 2 || authentication_vvvvwax == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -456,23 +435,13 @@ function vvvvway(authentication_vvvvway,protocol_vvvvway)
|
||||
if (authentication && protocol)
|
||||
{
|
||||
jQuery('#jform_private').closest('.control-group').show();
|
||||
if (jform_vvvvwaywan_required)
|
||||
if (jform_vvvvwaywam_required)
|
||||
{
|
||||
updateFieldRequired('private',0);
|
||||
jQuery('#jform_private').prop('required','required');
|
||||
jQuery('#jform_private').attr('aria-required',true);
|
||||
jQuery('#jform_private').addClass('required');
|
||||
jform_vvvvwaywan_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_public').closest('.control-group').show();
|
||||
if (jform_vvvvwaywao_required)
|
||||
{
|
||||
updateFieldRequired('public',0);
|
||||
jQuery('#jform_public').prop('required','required');
|
||||
jQuery('#jform_public').attr('aria-required',true);
|
||||
jQuery('#jform_public').addClass('required');
|
||||
jform_vvvvwaywao_required = false;
|
||||
jform_vvvvwaywam_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_secret').closest('.control-group').show();
|
||||
@ -480,22 +449,13 @@ function vvvvway(authentication_vvvvway,protocol_vvvvway)
|
||||
else
|
||||
{
|
||||
jQuery('#jform_private').closest('.control-group').hide();
|
||||
if (!jform_vvvvwaywan_required)
|
||||
if (!jform_vvvvwaywam_required)
|
||||
{
|
||||
updateFieldRequired('private',1);
|
||||
jQuery('#jform_private').removeAttr('required');
|
||||
jQuery('#jform_private').removeAttr('aria-required');
|
||||
jQuery('#jform_private').removeClass('required');
|
||||
jform_vvvvwaywan_required = true;
|
||||
}
|
||||
jQuery('#jform_public').closest('.control-group').hide();
|
||||
if (!jform_vvvvwaywao_required)
|
||||
{
|
||||
updateFieldRequired('public',1);
|
||||
jQuery('#jform_public').removeAttr('required');
|
||||
jQuery('#jform_public').removeAttr('aria-required');
|
||||
jQuery('#jform_public').removeClass('required');
|
||||
jform_vvvvwaywao_required = true;
|
||||
jform_vvvvwaywam_required = true;
|
||||
}
|
||||
jQuery('#jform_secret').closest('.control-group').hide();
|
||||
}
|
||||
@ -505,7 +465,7 @@ function vvvvway(authentication_vvvvway,protocol_vvvvway)
|
||||
function authentication_vvvvway_SomeFunc(authentication_vvvvway)
|
||||
{
|
||||
// set the function logic
|
||||
if (authentication_vvvvway == 2)
|
||||
if (authentication_vvvvway == 2 || authentication_vvvvway == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -105,8 +105,20 @@
|
||||
<!-- Option Set.-->
|
||||
<option value="">COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_SERVER_FTP</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_SERVER_SSH</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_SERVER_SFTP</option>
|
||||
</field>
|
||||
<!-- Host Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="host"
|
||||
label="COM_COMPONENTBUILDER_SERVER_HOST_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_SERVER_HOST_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_SERVER_HOST_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_HOST_HINT" />
|
||||
<!-- Note_ftp_signature Field. Type: Note. A None Database Field. (joomla)-->
|
||||
<field type="note"
|
||||
name="note_ftp_signature"
|
||||
@ -114,6 +126,27 @@
|
||||
description="COM_COMPONENTBUILDER_SERVER_NOTE_FTP_SIGNATURE_DESCRIPTION"
|
||||
heading="h4"
|
||||
class="alert alert-success note_ftp_signature" />
|
||||
<!-- Note_ssh_security Field. Type: Note. A None Database Field. (joomla)-->
|
||||
<field type="note"
|
||||
name="note_ssh_security"
|
||||
label="COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_DESCRIPTION"
|
||||
heading="h4"
|
||||
class="alert alert-info note_ssh_security" />
|
||||
<!-- Port Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="port"
|
||||
label="COM_COMPONENTBUILDER_SERVER_PORT_LABEL"
|
||||
size="10"
|
||||
maxlength="50"
|
||||
default="22"
|
||||
description="COM_COMPONENTBUILDER_SERVER_PORT_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
filter="INT"
|
||||
message="COM_COMPONENTBUILDER_SERVER_PORT_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_PORT_HINT"
|
||||
onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};" />
|
||||
<!-- Path Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="path"
|
||||
@ -128,48 +161,6 @@
|
||||
filter="PATH"
|
||||
message="COM_COMPONENTBUILDER_SERVER_PATH_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_PATH_HINT" />
|
||||
<!-- Port Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="port"
|
||||
label="COM_COMPONENTBUILDER_SERVER_PORT_LABEL"
|
||||
size="10"
|
||||
maxlength="50"
|
||||
description="COM_COMPONENTBUILDER_SERVER_PORT_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
filter="INT"
|
||||
message="COM_COMPONENTBUILDER_SERVER_PORT_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_PORT_HINT"
|
||||
onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};" />
|
||||
<!-- Authentication Field. Type: Radio. (joomla)-->
|
||||
<field type="radio"
|
||||
name="authentication"
|
||||
label="COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_LABEL"
|
||||
description="COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
required="true">
|
||||
<!-- Option Set.-->
|
||||
<option value="1">COM_COMPONENTBUILDER_SERVER_PASSWORD</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY</option>
|
||||
</field>
|
||||
<!-- Note_ssh_security Field. Type: Note. A None Database Field. (joomla)-->
|
||||
<field type="note"
|
||||
name="note_ssh_security"
|
||||
label="COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_DESCRIPTION"
|
||||
heading="h4"
|
||||
class="alert alert-info note_ssh_security" />
|
||||
<!-- Password Field. Type: Password. (joomla)-->
|
||||
<field type="password"
|
||||
name="password"
|
||||
label="COM_COMPONENTBUILDER_SERVER_PASSWORD_LABEL"
|
||||
size="60"
|
||||
description="COM_COMPONENTBUILDER_SERVER_PASSWORD_DESCRIPTION"
|
||||
message="Error! Please add the password here."
|
||||
class="text_area"
|
||||
required="true"
|
||||
filter="raw" />
|
||||
<!-- Secret Field. Type: Password. (joomla)-->
|
||||
<field type="password"
|
||||
name="secret"
|
||||
@ -179,18 +170,21 @@
|
||||
message="Error! Please add the passphrase here."
|
||||
class="text_area"
|
||||
filter="raw" />
|
||||
<!-- Host Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="host"
|
||||
label="COM_COMPONENTBUILDER_SERVER_HOST_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_SERVER_HOST_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_SERVER_HOST_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_HOST_HINT" />
|
||||
<!-- Authentication Field. Type: List. (joomla)-->
|
||||
<field type="list"
|
||||
name="authentication"
|
||||
label="COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_LABEL"
|
||||
description="COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="true">
|
||||
<!-- Option Set.-->
|
||||
<option value="">COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_SERVER_PASSWORD</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_FILE</option>
|
||||
<option value="3">COM_COMPONENTBUILDER_SERVER_BOTH</option>
|
||||
</field>
|
||||
<!-- Signature Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="signature"
|
||||
@ -204,6 +198,20 @@
|
||||
message="COM_COMPONENTBUILDER_SERVER_SIGNATURE_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_SIGNATURE_HINT"
|
||||
autocomplete="off" />
|
||||
<!-- Password Field. Type: Password. (joomla)-->
|
||||
<field type="password"
|
||||
name="password"
|
||||
label="COM_COMPONENTBUILDER_SERVER_PASSWORD_LABEL"
|
||||
size="60"
|
||||
description="COM_COMPONENTBUILDER_SERVER_PASSWORD_DESCRIPTION"
|
||||
message="Error! Please add the password here."
|
||||
class="text_area"
|
||||
required="true"
|
||||
filter="raw" />
|
||||
<!-- Not_required Field. Type: Hidden. (joomla)-->
|
||||
<field type="hidden"
|
||||
name="not_required"
|
||||
default="[]" />
|
||||
<!-- Username Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="username"
|
||||
@ -216,10 +224,6 @@
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_SERVER_USERNAME_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_USERNAME_HINT" />
|
||||
<!-- Not_required Field. Type: Hidden. (joomla)-->
|
||||
<field type="hidden"
|
||||
name="not_required"
|
||||
default="[]" />
|
||||
<!-- Private Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="private"
|
||||
@ -234,20 +238,6 @@
|
||||
filter="PATH"
|
||||
message="COM_COMPONENTBUILDER_SERVER_PRIVATE_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_PRIVATE_HINT" />
|
||||
<!-- Public Field. Type: Text. (joomla)-->
|
||||
<field type="text"
|
||||
name="public"
|
||||
label="COM_COMPONENTBUILDER_SERVER_PUBLIC_LABEL"
|
||||
size="50"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_SERVER_PUBLIC_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="true"
|
||||
filter="PATH"
|
||||
message="COM_COMPONENTBUILDER_SERVER_PUBLIC_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_PUBLIC_HINT" />
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
@ -100,10 +100,10 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
// Get the encryption object.
|
||||
$basic = new FOFEncryptAes($basickey, 128);
|
||||
|
||||
if (!empty($item->path) && $basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true)))
|
||||
if (!empty($item->host) && $basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true)))
|
||||
{
|
||||
// basic decrypt data path.
|
||||
$item->path = rtrim($basic->decryptString($item->path), "\0");
|
||||
// basic decrypt data host.
|
||||
$item->host = rtrim($basic->decryptString($item->host), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->port) && $basickey && !is_numeric($item->port) && $item->port === base64_encode(base64_decode($item->port, true)))
|
||||
@ -112,10 +112,10 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
$item->port = rtrim($basic->decryptString($item->port), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->password) && $basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true)))
|
||||
if (!empty($item->path) && $basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true)))
|
||||
{
|
||||
// basic decrypt data password.
|
||||
$item->password = rtrim($basic->decryptString($item->password), "\0");
|
||||
// basic decrypt data path.
|
||||
$item->path = rtrim($basic->decryptString($item->path), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->secret) && $basickey && !is_numeric($item->secret) && $item->secret === base64_encode(base64_decode($item->secret, true)))
|
||||
@ -124,18 +124,18 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
$item->secret = rtrim($basic->decryptString($item->secret), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->host) && $basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true)))
|
||||
{
|
||||
// basic decrypt data host.
|
||||
$item->host = rtrim($basic->decryptString($item->host), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->signature) && $basickey && !is_numeric($item->signature) && $item->signature === base64_encode(base64_decode($item->signature, true)))
|
||||
{
|
||||
// basic decrypt data signature.
|
||||
$item->signature = rtrim($basic->decryptString($item->signature), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->password) && $basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true)))
|
||||
{
|
||||
// basic decrypt data password.
|
||||
$item->password = rtrim($basic->decryptString($item->password), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->username) && $basickey && !is_numeric($item->username) && $item->username === base64_encode(base64_decode($item->username, true)))
|
||||
{
|
||||
// basic decrypt data username.
|
||||
@ -146,12 +146,6 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
{
|
||||
// basic decrypt data private.
|
||||
$item->private = rtrim($basic->decryptString($item->private), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->public) && $basickey && !is_numeric($item->public) && $item->public === base64_encode(base64_decode($item->public, true)))
|
||||
{
|
||||
// basic decrypt data public.
|
||||
$item->public = rtrim($basic->decryptString($item->public), "\0");
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
@ -170,7 +164,7 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
*
|
||||
* @return mixed An array of data items on success, false on failure.
|
||||
*/
|
||||
public function getWaplinked_components()
|
||||
public function getWanlinked_components()
|
||||
{
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
@ -966,10 +960,10 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
// Get the encryption object
|
||||
$basic = new FOFEncryptAes($basickey, 128);
|
||||
|
||||
// Encrypt data path.
|
||||
if (isset($data['path']) && $basickey)
|
||||
// Encrypt data host.
|
||||
if (isset($data['host']) && $basickey)
|
||||
{
|
||||
$data['path'] = $basic->encryptString($data['path']);
|
||||
$data['host'] = $basic->encryptString($data['host']);
|
||||
}
|
||||
|
||||
// Encrypt data port.
|
||||
@ -978,10 +972,10 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
$data['port'] = $basic->encryptString($data['port']);
|
||||
}
|
||||
|
||||
// Encrypt data password.
|
||||
if (isset($data['password']) && $basickey)
|
||||
// Encrypt data path.
|
||||
if (isset($data['path']) && $basickey)
|
||||
{
|
||||
$data['password'] = $basic->encryptString($data['password']);
|
||||
$data['path'] = $basic->encryptString($data['path']);
|
||||
}
|
||||
|
||||
// Encrypt data secret.
|
||||
@ -990,18 +984,18 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
$data['secret'] = $basic->encryptString($data['secret']);
|
||||
}
|
||||
|
||||
// Encrypt data host.
|
||||
if (isset($data['host']) && $basickey)
|
||||
{
|
||||
$data['host'] = $basic->encryptString($data['host']);
|
||||
}
|
||||
|
||||
// Encrypt data signature.
|
||||
if (isset($data['signature']) && $basickey)
|
||||
{
|
||||
$data['signature'] = $basic->encryptString($data['signature']);
|
||||
}
|
||||
|
||||
// Encrypt data password.
|
||||
if (isset($data['password']) && $basickey)
|
||||
{
|
||||
$data['password'] = $basic->encryptString($data['password']);
|
||||
}
|
||||
|
||||
// Encrypt data username.
|
||||
if (isset($data['username']) && $basickey)
|
||||
{
|
||||
@ -1012,12 +1006,6 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
if (isset($data['private']) && $basickey)
|
||||
{
|
||||
$data['private'] = $basic->encryptString($data['private']);
|
||||
}
|
||||
|
||||
// Encrypt data public.
|
||||
if (isset($data['public']) && $basickey)
|
||||
{
|
||||
$data['public'] = $basic->encryptString($data['public']);
|
||||
}
|
||||
|
||||
// Set the Params Items to data
|
||||
|
@ -152,7 +152,7 @@ class ComponentbuilderModelServers extends JModelList
|
||||
$protocolArray = array(
|
||||
0 => 'COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION',
|
||||
1 => 'COM_COMPONENTBUILDER_SERVER_FTP',
|
||||
2 => 'COM_COMPONENTBUILDER_SERVER_SSH'
|
||||
2 => 'COM_COMPONENTBUILDER_SERVER_SFTP'
|
||||
);
|
||||
// Now check if value is found in this array
|
||||
if (isset($protocolArray[$value]) && ComponentbuilderHelper::checkString($protocolArray[$value]))
|
||||
@ -304,36 +304,36 @@ class ComponentbuilderModelServers extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true)))
|
||||
if ($basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true)))
|
||||
{
|
||||
// decrypt path
|
||||
$item->path = $basic->decryptString($item->path);
|
||||
// decrypt host
|
||||
$item->host = $basic->decryptString($item->host);
|
||||
}
|
||||
if ($basickey && !is_numeric($item->port) && $item->port === base64_encode(base64_decode($item->port, true)))
|
||||
{
|
||||
// decrypt port
|
||||
$item->port = $basic->decryptString($item->port);
|
||||
}
|
||||
if ($basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true)))
|
||||
if ($basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true)))
|
||||
{
|
||||
// decrypt password
|
||||
$item->password = $basic->decryptString($item->password);
|
||||
// decrypt path
|
||||
$item->path = $basic->decryptString($item->path);
|
||||
}
|
||||
if ($basickey && !is_numeric($item->secret) && $item->secret === base64_encode(base64_decode($item->secret, true)))
|
||||
{
|
||||
// decrypt secret
|
||||
$item->secret = $basic->decryptString($item->secret);
|
||||
}
|
||||
if ($basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true)))
|
||||
{
|
||||
// decrypt host
|
||||
$item->host = $basic->decryptString($item->host);
|
||||
}
|
||||
if ($basickey && !is_numeric($item->signature) && $item->signature === base64_encode(base64_decode($item->signature, true)))
|
||||
{
|
||||
// decrypt signature
|
||||
$item->signature = $basic->decryptString($item->signature);
|
||||
}
|
||||
if ($basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true)))
|
||||
{
|
||||
// decrypt password
|
||||
$item->password = $basic->decryptString($item->password);
|
||||
}
|
||||
if ($basickey && !is_numeric($item->username) && $item->username === base64_encode(base64_decode($item->username, true)))
|
||||
{
|
||||
// decrypt username
|
||||
@ -344,11 +344,6 @@ class ComponentbuilderModelServers extends JModelList
|
||||
// decrypt private
|
||||
$item->private = $basic->decryptString($item->private);
|
||||
}
|
||||
if ($basickey && !is_numeric($item->public) && $item->public === base64_encode(base64_decode($item->public, true)))
|
||||
{
|
||||
// decrypt public
|
||||
$item->public = $basic->decryptString($item->public);
|
||||
}
|
||||
// unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
|
Reference in New Issue
Block a user