Replace methods with safe variants. Let's see how this works out.

This commit is contained in:
James Cole
2025-05-04 12:11:25 +02:00
parent fb31f25d71
commit 446e855b74
71 changed files with 480 additions and 353 deletions

View File

@@ -96,8 +96,8 @@ class OAuthKeys
{
$private = storage_path('oauth-private.key');
$public = storage_path('oauth-public.key');
app('fireflyconfig')->set(self::PRIVATE_KEY, Crypt::encrypt(file_get_contents($private)));
app('fireflyconfig')->set(self::PUBLIC_KEY, Crypt::encrypt(file_get_contents($public)));
app('fireflyconfig')->set(self::PRIVATE_KEY, Crypt::encrypt(\Safe\file_get_contents($private)));
app('fireflyconfig')->set(self::PUBLIC_KEY, Crypt::encrypt(\Safe\file_get_contents($public)));
}
/**
@@ -123,8 +123,8 @@ class OAuthKeys
}
$private = storage_path('oauth-private.key');
$public = storage_path('oauth-public.key');
file_put_contents($private, $privateContent);
file_put_contents($public, $publicContent);
\Safe\file_put_contents($private, $privateContent);
\Safe\file_put_contents($public, $publicContent);
return true;
}