Skip to content

Commit 5417a1e

Browse files
committed
fix libraries: don't make use of shell commands for fileMake
1 parent b126300 commit 5417a1e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

app/BlueprintFramework/Libraries/ExtensionLibrary/Admin/BlueprintAdminLibrary.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ public function fileRead($path) {
119119
* [BlueprintExtensionLibrary documentation](https://blueprint.zip/docs/?page=documentation/$blueprint)
120120
*/
121121
public function fileMake($path) {
122-
return shell_exec("touch ".escapeshellarg($path).";");
122+
$file = fopen($path, "w");
123+
fclose($file);
123124
}
124125

125126
/**

app/BlueprintFramework/Libraries/ExtensionLibrary/Client/BlueprintClientLibrary.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public function fileRead($path) {
7676
* [BlueprintExtensionLibrary documentation](https://blueprint.zip/docs/?page=documentation/$blueprint)
7777
*/
7878
public function fileMake($path) {
79-
return shell_exec("touch ".escapeshellarg($path).";");
79+
$file = fopen($path, "w");
80+
fclose($file);
8081
}
8182

8283
/**

0 commit comments

Comments
 (0)