File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 6262{% endif %}
6363{% for parameter in method.parameters.body %}
6464{% if parameter.type == 'file' and method.packaging %}
65+ ${{ parameter.name | caseCamel }} = \urldecode(${{ parameter.name | caseCamel }});
6566 $cloudFunctionPath = realpath(__DIR__.'/../../../files/'.${{ parameter.name | caseCamel }});
66- $cloudFunctionParentDir = dirname($cloudFunctionPath , 1);
67- $cloudFunctionDirName = basename($cloudFunctionPath );
67+ $cloudFunctionParentDir = escapeshellarg( dirname($cloudFunctionPath , 1) );
68+ $cloudFunctionDirName = escapeshellarg( basename($cloudFunctionPath ) );
6869 if (file_exists($cloudFunctionPath ) === false ) {
6970 throw new Exception(" Path doesn ' t exist. Please ensure that the path is within the current directory. ");
7071 }
7576 $cFile = new \CURLFile($archivePath, ' application / x - gzip ' , basename($archivePath));
7677 $params[' {{ parameter . name }}' ] = $cFile;
7778{% elseif parameter.type == ' file ' %}
78- ${{ parameter.name | caseCamel }} = realpath(__DIR__.' / .. / .. / .. / files / ' .${{ parameter.name | caseCamel }});
79+ ${{ parameter.name | caseCamel }} = realpath(__DIR__.' / .. / .. / .. / files / ' .\urldecode( ${{ parameter.name | caseCamel }}) );
7980 if (file_exists(${{ parameter.name | caseCamel }}) === false ) {
8081 throw new Exception("Path doesn' t exist . Please ensure that the path is within the current directory . " );
8182 }
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ for x in "${@}" ; do
140140 _args=$_args" "$x
141141done
142142
143- bash -c "docker run -i --rm --volume {{ spec.title | lower }}-cli:/usr/local/code/app/.preferences/ --volume $(pwd) :/usr/local/code/files:rw --network host ' ${{ spec.title | upper } }_CLI_IMAGE_NAME:${{ spec.title | upper } }_CLI_IMAGE_VERSION' $_args" ' > ${{ spec.title | upper } }_TEMP_NAME
143+ bash -c "docker run -i --rm --volume {{ spec.title | lower }}-cli:/usr/local/code/app/.preferences/ --volume \"$PWD\" :/usr/local/code/files:rw --network host ' ${{ spec.title | upper } }_CLI_IMAGE_NAME:${{ spec.title | upper } }_CLI_IMAGE_VERSION' $_args" ' > ${{ spec.title | upper } }_TEMP_NAME
144144
145145 printf " ${GREEN} 🚧 Setting Permissions ${NC} \n"
146146 chmod +x ${{ spec.title | upper } }_TEMP_NAME
You can’t perform that action at this time.
0 commit comments