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

@ -5237,8 +5237,9 @@ COM_COMPONENTBUILDER_SERVERS_N_ITEMS_UNPUBLISHED_1="%s Server unpublished."
COM_COMPONENTBUILDER_SERVERS_SUBMENU="Servers Submenu"
COM_COMPONENTBUILDER_SERVERS_SUBMENU_DESC="Allows the users in this group to update the submenu of the server"
COM_COMPONENTBUILDER_SERVER_AUTHENTICATION="Authentication"
COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_DESCRIPTION="Select the authentication type to use with ssh."
COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_DESCRIPTION="Select the authentication type to use with SFTP."
COM_COMPONENTBUILDER_SERVER_AUTHENTICATION_LABEL="Authentication Type"
COM_COMPONENTBUILDER_SERVER_BOTH="Both"
COM_COMPONENTBUILDER_SERVER_CREATED_BY_DESC="The user that created this Server."
COM_COMPONENTBUILDER_SERVER_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_SERVER_CREATED_DATE_DESC="The date this Server was created."
@ -5248,9 +5249,9 @@ COM_COMPONENTBUILDER_SERVER_EDIT="Editing the Server"
COM_COMPONENTBUILDER_SERVER_ERROR_UNIQUE_ALIAS="Another Server has the same alias."
COM_COMPONENTBUILDER_SERVER_FTP="FTP"
COM_COMPONENTBUILDER_SERVER_HOST="Host"
COM_COMPONENTBUILDER_SERVER_HOST_DESCRIPTION="Add the server host name here"
COM_COMPONENTBUILDER_SERVER_HOST_DESCRIPTION="Add the server host name/IP here"
COM_COMPONENTBUILDER_SERVER_HOST_HINT="yourhost.com"
COM_COMPONENTBUILDER_SERVER_HOST_LABEL="Host<br /><small>(basic encryption)</small>"
COM_COMPONENTBUILDER_SERVER_HOST_LABEL="Host/IP<br /><small>(basic encryption)</small>"
COM_COMPONENTBUILDER_SERVER_HOST_MESSAGE="Error! Please add server host name here."
COM_COMPONENTBUILDER_SERVER_ID="Id"
COM_COMPONENTBUILDER_SERVER_LINKED_COMPONENTS="Linked Components"
@ -5266,8 +5267,8 @@ COM_COMPONENTBUILDER_SERVER_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_SERVER_NEW="A New Server"
COM_COMPONENTBUILDER_SERVER_NOTE_FTP_SIGNATURE_DESCRIPTION="Add your FTP signature in the given field.<br /><b>Here are the details of the signature:</b><br />&nbsp;&nbsp;&nbsp;string $host = '127.0.0.1'<br />&nbsp;&nbsp;&nbsp;string $port = '21'<br />&nbsp;&nbsp;&nbsp;array $options = array()<br />&nbsp;&nbsp;&nbsp;string $user = null<br />&nbsp;&nbsp;&nbsp;string $pass = null<br />&nbsp;&nbsp;&nbsp;OPTIONS = Array with any of these options:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type=>[FTP_AUTOASCII|FTP_ASCII|FTP_BINARY]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timeout=>(int)<br /><b>Here is an example signature:</b><br /><code>host=HOSTNAME&port=PORT_INT&options[type]=FTP_BINARY&options[timeout]=15&username=user@name.com&password=password</code>"
COM_COMPONENTBUILDER_SERVER_NOTE_FTP_SIGNATURE_LABEL="The FTP Signature Details"
COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_DESCRIPTION="<b>Do not use this feature if you do not know exactly what you are doing!</b> SSH is a cryptographic network protocol for operating network services securely over an unsecured network, but if not used correctly it can cause a major breach in security."
COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_LABEL="The SSH Security Cautions!"
COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_DESCRIPTION="<b>Do not use this feature if you do not know exactly what you are doing!</b> Secure File Transfer Protocol (SFTP) is a secure version of File Transfer Protocol (FTP), which facilitates data access and data transfer over a Secure Shell (SSH) data stream. It is part of the SSH Protocol. This term is also known as SSH File Transfer Protocol. Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network, but if not used correctly it can cause a major breach in security."
COM_COMPONENTBUILDER_SERVER_NOTE_SSH_SECURITY_LABEL="The SFTP Security Cautions!"
COM_COMPONENTBUILDER_SERVER_NOT_REQUIRED="Not Required"
COM_COMPONENTBUILDER_SERVER_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_SERVER_PASSWORD="Password"
@ -5287,29 +5288,24 @@ COM_COMPONENTBUILDER_SERVER_PORT_MESSAGE="Error! Please add port number here."
COM_COMPONENTBUILDER_SERVER_PRIVATE="Private"
COM_COMPONENTBUILDER_SERVER_PRIVATE_DESCRIPTION="Set the path to the private key."
COM_COMPONENTBUILDER_SERVER_PRIVATE_HINT="/home/username/.ssh/id_rsa"
COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY="Private Key"
COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_FILE="Private Key File"
COM_COMPONENTBUILDER_SERVER_PRIVATE_LABEL="Private Key Path<br /><small>(basic encryption)</small>"
COM_COMPONENTBUILDER_SERVER_PRIVATE_MESSAGE="Error! Please add private key path."
COM_COMPONENTBUILDER_SERVER_PROTOCOL="Protocol"
COM_COMPONENTBUILDER_SERVER_PROTOCOL_DESCRIPTION="Select the protocol used to connect to this server."
COM_COMPONENTBUILDER_SERVER_PROTOCOL_LABEL="Protocol"
COM_COMPONENTBUILDER_SERVER_PUBLIC="Public"
COM_COMPONENTBUILDER_SERVER_PUBLIC_DESCRIPTION="Set the path to the public key."
COM_COMPONENTBUILDER_SERVER_PUBLIC_HINT="/home/username/.ssh/id_rsa.pub"
COM_COMPONENTBUILDER_SERVER_PUBLIC_LABEL="Public Key Path<br /><small>(basic encryption)</small>"
COM_COMPONENTBUILDER_SERVER_PUBLIC_MESSAGE="Error! Please add public key path."
COM_COMPONENTBUILDER_SERVER_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_SERVER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Server to customise the alias."
COM_COMPONENTBUILDER_SERVER_SECRET="Secret"
COM_COMPONENTBUILDER_SERVER_SECRET_DESCRIPTION="If private key file is encrypted (which it should be), the passphrase must be provided."
COM_COMPONENTBUILDER_SERVER_SECRET_LABEL="Passphrase<br /><small>(basic encryption)</small>"
COM_COMPONENTBUILDER_SERVER_SELECT_AN_OPTION="Select an option"
COM_COMPONENTBUILDER_SERVER_SFTP="SFTP"
COM_COMPONENTBUILDER_SERVER_SIGNATURE="Signature"
COM_COMPONENTBUILDER_SERVER_SIGNATURE_DESCRIPTION="The FTP login details needed. If the basic key was not set when you created this FTP signature, then add the basic key, come back here and save this FTP signature again to ensure that it gets encrypted."
COM_COMPONENTBUILDER_SERVER_SIGNATURE_HINT="host=HOSTNAME&port=PORT_INT&options[type]=FTP_BINARY&options[timeout]=15&username=user@name.com&password=password"
COM_COMPONENTBUILDER_SERVER_SIGNATURE_LABEL="FTP Server (Signature)<br /><small>(encrypted field)</small><br /><small><i>This field is only encrypted if your basic key in the JCB global settings is set.</i></small>"
COM_COMPONENTBUILDER_SERVER_SIGNATURE_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_SERVER_SSH="SSH"
COM_COMPONENTBUILDER_SERVER_STATUS="Status"
COM_COMPONENTBUILDER_SERVER_USERNAME="Username"
COM_COMPONENTBUILDER_SERVER_USERNAME_DESCRIPTION="Enter the username."
@ -6150,12 +6146,17 @@ COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates"
COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS="The library config fields"
COM_COMPONENTBUILDER_THE_LIBRARY_FILES_FOLDERS_URLS="The library files, folders & URLs"
COM_COMPONENTBUILDER_THE_LOGIN_TO_BSB_HAS_FAILED_PLEASE_CHECK_THAT_YOUR_USERNAME_AND_PASSWORD_ARE_CORRECT="The login to <b>%s</b> has failed, please check that your username and password are correct!"
COM_COMPONENTBUILDER_THE_LOGIN_TO_BSB_HAS_FAILED_PLEASE_CHECK_THAT_YOUR_USERNAME_AND_PRIVATE_KEY_FILE_ARE_CORRECT="The login to <b>%s</b> has failed, please check that your username and private key file are correct!"
COM_COMPONENTBUILDER_THE_LOGIN_TO_BSB_HAS_FAILED_PLEASE_CHECK_THAT_YOUR_USERNAME_PASSWORD_AND_PRIVATE_KEY_FILE_ARE_CORRECT="The login to <b>%s</b> has failed, please check that your username, password and private key file are correct!"
COM_COMPONENTBUILDER_THE_NAME_OF_THIS_LIBRARY_BSB_CAN_NOT_BE_CHANGED_TO_BSB_OR_THINGS_WILL_BREAK="The name of this library (<b>%s</b>) can not be changed to <b>%s</b> or things will break."
COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading"
COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: <code>%s</code>"
COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s"
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!"
COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading"
COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BSNIPPET_LIBRARY_OR_SNIPPET_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_SNIPPETS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the snippets are case sensitive so if you changed the local <b>names</b> of either or the <b>snippet, library or snippet types</b> in any small way, the system will not be able to connect your local snippets with those in the community repository. So we strongly advice to <b>keep to the community naming</b> to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected."
COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BSB_COULD_NOT_BE_RETRIEVED="The server details for <b>(%s)</b> could not be retrieved!"
COM_COMPONENTBUILDER_THE_SNIPPETS_WERE_SUCCESSFULLY_EXPORTED="The Snippets Were Successfully Exported!"
COM_COMPONENTBUILDER_THE_SNIPPET_WAS_SUCCESSFULLY_EXPORTED="The Snippet Was Successfully Exported!"
COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading"