mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 20:20:34 +09:00
feat: Inject password from db during testing when editing enhanced apps
This commit is contained in:
committed by
Attila Jozsef Kerekes
parent
9a80064a50
commit
8bad474808
@@ -407,6 +407,15 @@ class ItemController extends Controller
|
||||
$single = Application::single($data['type']);
|
||||
$app = $single->class;
|
||||
|
||||
// If password is not resubmitted fill it from the database when in edit mode
|
||||
if ($data['password'] === null && array_key_exists('id', $data)) {
|
||||
$item = Item::find($data['id']);
|
||||
if ($item) {
|
||||
$itemConfig = $item->getConfig();
|
||||
$data['password'] = $itemConfig->password;
|
||||
}
|
||||
}
|
||||
|
||||
$app_details = new $app();
|
||||
$app_details->config = (object) $data;
|
||||
$app_details->test();
|
||||
|
||||
Reference in New Issue
Block a user