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:
2018-02-18 00:47:01 +02:00
parent 9055c560f8
commit c3156642b2
28 changed files with 642 additions and 723 deletions

View File

@ -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;
}
}
}

View File

@ -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;
}

View File

@ -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. -->