mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-10 18:33:46 +02:00
Support special characters in database password, closes #1508
This commit is contained in:
@@ -135,15 +135,13 @@ class DatabaseController extends Controller
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Illuminate\Auth\Access\AuthorizationException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function update(Request $request): JsonResponse
|
||||
{
|
||||
$this->authorize('reset-db-password', $request->attributes->get('server'));
|
||||
|
||||
$password = str_random(24);
|
||||
$this->passwordService->handle($request->attributes->get('database'), $password);
|
||||
$password = $this->passwordService->handle($request->attributes->get('database'));
|
||||
|
||||
return response()->json(['password' => $password]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user